您的位置:首页 > Web前端 > CSS

css 实现6宫格图标

2015-07-09 18:37 525 查看
<!DOCTYPE html>

<html lang="en">

<head>

<title>Unicorn Admin</title>

<meta charset="UTF-8" />

<style type="text/css" media="screen">

.test{

width:100px;

height: 100px;

background-color: gray;

}

.test:after{

content: "";

display: block;

width: 100%;

height: 33.3%;

border-top: 1px solid white;

border-bottom: 1px solid white;

margin-top: -66.6%;

}

.test:before{

content: "";

display: block;

width: 33%;

height: 100%;

border-right: 2px solid white;

}

</style>

</head>

<body >

<div>

<div class="test">

</div>

</div>

</body>

</html>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: