此篇为了整理自己在调整CSS样式中遇到过的问题
1.内容过长时,使用省略号代替
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
2.滚动条的粗细
.includes {
height: calc(~‘100% - 120px’);
.lists {
width: 300px;
margin: 0px 10px;
overflow-y: auto;
height: 100%;
}
.lists::-webkit-scrollbar { /滚动条整体样式/
width: 4px; /高宽分别对应横竖滚动条的尺寸/
height: 4px;
}
.lists::-webkit-scrollbar-thumb { /滚动条里面小方块/
border-radius: 5px;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
background: rgba(0, 0, 0, 0.2);
}
.lists::-webkit-scrollbar-track { /滚动条里面轨道/
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.1);
border-radius: 0;
background: rgba(0, 0, 0, 0.1);
}
}
3.CSS框线一览表:
border-top : 1px solid #6699cc; /上框线/
border-bottom : 1px solid #6699cc; /下框线/
border-left : 1px solid #6699cc; /左框线/
border-right : 1px solid #6699cc; /右框线/
以上是建议书写方式,但也可以使用常规的方式 如下:
border-top-color : #369 /设置上框线top颜色/
border-top-width :1px /设置上框线top宽度/
border-top-style : solid/设置上框线top样式/
其他框线样式
solid /实线框/
dotted /虚线框/
double /双线框/
groove /立体内凸框/
ridge /立体浮雕框/
inset /凹框/
outset /凸框/
4.背景样式:
background-color:#F5E2EC; /背景颜色/
background:transparent; /透视背景/
background-image : url(/image/bg.gif); /背景图片/
background-repeat : no-repeat; /不重复排列/
background-repeat : repeat-x; /在x轴重复排列/
background-repeat : repeat-y; /在y轴重复排列/