DIV+CSS 如何把一个层平分四份
作者:
INGME | 来源:发表于
2017-11-29 20:45 被阅读0次<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="css/base.css"/>
<style>
.box{
width:1000px;
height:300px;
border:1px solid #333;
}
.box>div{
width:25%;
height:100%;
float:left;
position: relative;
}
.box>div:after{
content:"";
display: block;
width:100%;
height:100%;
position: absolute;
top:0;
left:0;
border-right:1px solid #333;
pointer-events: none; //鼠标事件
z-index:100;
}
</style>
</head>
<body>
<div class="box row center">
<div>
<a href="#">hello world</a>
</div>
<div></div>
<div></div>
<div></div>
</div>
</body>
</html>
本文标题:DIV+CSS 如何把一个层平分四份
本文链接:https://www.haomeiwen.com/subject/ijwpbxtx.html
网友评论