“:root”选择器等同于<html>元素,简单点说:
:root{background:orange}
html {background:orange;}
得到的效果等同。
:root{background:orange}
html {background:orange;}
得到的效果等同。
2015-01-14
a[class^=column]{background:red;}开头
a[href$=doc]{background:green;}结尾
a[title*=box]{background:blue;}包含
a[href$=doc]{background:green;}结尾
a[title*=box]{background:blue;}包含
2015-01-14
<style type="text/css">
a[class^=column]{
background:red;
color:#fff;}
a[href$=doc]{ background:green;color:#fff;}
a[title*=box]{ background:blue;color:#fff;}
</style>
a[class^=column]{
background:red;
color:#fff;}
a[href$=doc]{ background:green;color:#fff;}
a[title*=box]{ background:blue;color:#fff;}
</style>
2015-01-14
/*使用伪元素制作导航列表项分隔线*/
.nav li:before{content:""; position:absolute;
top:14px;
height:25px;left:-1px; width:1px; background-image:linear-gradient(to bottom,#f65f57,#993333,#f65f57); }
/*删除第一项和最后一项导航分隔线*/
.nav li:first-child:before{content:'';}
.nav li:before{content:""; position:absolute;
top:14px;
height:25px;left:-1px; width:1px; background-image:linear-gradient(to bottom,#f65f57,#993333,#f65f57); }
/*删除第一项和最后一项导航分隔线*/
.nav li:first-child:before{content:'';}
2015-01-14
实心右半圆
height:100px;
width:50px;
background:#9da;
border-radius: 0px 50px 50px 0px;
主要记住 border-radius 的四个参数是 从左上角开始 顺时针的,所以每个角都可以调
height:100px;
width:50px;
background:#9da;
border-radius: 0px 50px 50px 0px;
主要记住 border-radius 的四个参数是 从左上角开始 顺时针的,所以每个角都可以调
2015-01-13
/*删除第一项和最后一项导航分隔线*/
.nav li:first-child:before,.nav li:last-child:after{
background-image: none;
}
.nav li:first-child:before,.nav li:last-child:after{
background-image: none;
}
2015-01-13
/*制作圆*/
border-radius: 8px;
/*制作导航立体风格*/
box-shadow:0px 6px rgba(177,61,50,1);
border-radius: 8px;
/*制作导航立体风格*/
box-shadow:0px 6px rgba(177,61,50,1);
2015-01-13
<style>
a[class^=column]{
background:red;
}
a[href$=doc]{
background:green;
}
a[title*=box]{
background:blue;
}
</style>
a[class^=column]{
background:red;
}
a[href$=doc]{
background:green;
}
a[title*=box]{
background:blue;
}
</style>
2015-01-13