CSS实际开发总结
整理前台开发常用的css
1. width:18em;overflow:hidden;text-overflow:ellipsis; white-space:nowrap; //内容超出自动截取并以'...'结尾
2. display:inline-block; overflow:auto;//div 嵌套,子div中内容超出范围可以设置: display:inline-block; overflow:auto 即可让子div中出现滚轴
3.想让div中内容垂直方向居中 设置:height:div高度;line-height:div高度 即可
4. 子div在父div底部显示 .box1 {border:1px #cccccc solid; width:500px; height:600px;position:relative;}
.box2 {border-top:1px #cccccc solid;width:498px; height:22px; position:absolute; bottom:0;}
5. div背景居中 background-position:center
后续补充……
学无先后,达者为师

浙公网安备 33010602011771号