一. HTML
二. CSS
1. 隐藏浏览器滚动条
::-webkit-scrollbar {
width: 0;
margin-right: 2px;
}
::-webkit-scrollbar-track-piece {
background-color: white;
}
::-webkit-scrollbar:horizontal {
height: 0;
margin-bottom: 2px;
}
::-webkit-scrollbar-track-piece {
background-color: white;
}
::-webkit-scrollbar-thumb {
width: 0px;
background: #CBCBCB;
}
::-webkit-scrollbar-thumb:hover {
background: #909090;
}
2. 边框不占宽度和高度
*{
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
3. 背景图片不平铺
.div{
background-repeat: no-repeat;
}
4. 选择器
p:nth-child(odd){}
p:nth-child(even){}
三. JavaScript