<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>CSS测试</title>
<style>
.div{
background-color:#999;
}
.box{
background-color:yellow
;
float: left;
width: 25%;
width: calc(25% - 5px);
border:1px solid Black;
}
/*
calc()可以计算公式
注意:运算符左右要加空格
*/
</style>
</head>
<body>
<div>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
</div>
</body>
</html>