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>
<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>
相关文章推荐
- css3--背景图片适应不同分辨率手机
- css在用空元素、无内容的元素布局不兼容ie7/8
- CSS3中的calc()
- css 水平居中 垂直居中方法
- css3质感分析(5)径向渐变叠加纹理(圆心可变)
- LESS CSS 框架简介
- css3流动布局
- 如何去掉IE文本框后的那个X css代码
- Button改变样式
- CSS3 经典教程系列:CSS3 线性渐变(linear-gradient)
- 在CSS中,BOX的Padding属性的数值赋予顺序为
- CSS中id和class的区别
- wpf Combobox没有黑三角,鼠标移上去改变样式
- Web前端从入门到精通-5 css简介——css概述和选择器
- CSS word-spacing 属性
- css3选择器
- css3-制作渐变
- css3-变形transforms
- css3-过渡transtition
- css自定义字体(图标)-有些图标不要在P图了