CSS样式表小记
鼠标样式
cursor:pointer;
圆角
border-radius:5px;
字体垂直居中
line-height与height相同
图片不随滚动条滚动
position:fixed;
top:..;
left:..;
透明度
opacity:0.6
横线
<hr style="height:3px;border:none;border-top:3px double red;" />
表格合并
rowspan
colspan
table 间隔
cellpadding="0" cellspacing="0"
表格不换行
word-break:keep-all; /* 不换行 */
white-space:nowrap;
table 合并
border-collapse:collapse;
table字数多的省略
table{
width:100px;
table-layout:fixed;/* 只有定义了表格的布局算法为fixed,下面td的定义才能起作用。 */
}
td{
width:100%;
word-break:keep-all;/* 不换行 */
white-space:nowrap;/* 不换行 */
overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */
text-overflow:ellipsis;/* 当对象内文本溢出时显示省略标记(...) ;需与overflow:hidden;一起使用*/
}
禁止textarea拉伸
resize:none
行间距设置
border-collapse:separate; border-spacing:10px;
checkbox 对齐 style="vertical-align:middle;"