实用技巧1


1.绿色边框三角

#div1{
width: 0;
height: 0;

正方形:被边框border填满,所以对border进行属性设置

border: 10px solid;
border-color: transparent transparent #00b38a transparent;

定位
position: absolute;
left: 62.5px;
top: -9px;
}
#div2{
border-bottom-color: #fff;

定位
position: absolute;
left: 62.5px;
top: -8px;
}

2.去除li属性黑点:

list-style: none;

3.去除a属性下划线:

text-decoration: none; 

4.让盒模型变圆角:

border-radius: 255px;(变圆角/变圆形: 宽度500+左边框5+右边框5=510) = border-radius: 50%;     50%":变为圆形

5.background简便写法:

{background: lightblue; background-image: url(); background-repeat-y: no-repeat;}  等于 background: url() no-repeat;

相关