日常常用css样式大全,超出隐藏,不换行,省略号,两行超出隐藏,不换行,省略号,CSS中划线(删除线)样式代码 (价格),a超链接下划线,css 3个4个5个字两边对齐,鼠标手形状,垂直居中等

文字去掉默认抛边

line-height:1;

 

单行超出隐藏,不换行,省略号

overflow:hidden;   //超出的文本隐藏
text-overflow:ellipsis;   //溢出用省略号显示
white-space:nowrap;   //溢出不换行

 


两行超出隐藏,不换行,省略号

text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;//显示行数控制器
-webkit-box-orient: vertical;

 

CSS中划线(删除线)样式代码 (价格)

text-decoration:line-through;

 


a超链接

text-decoration: underline;  /*加下划线*/
text-decoration:none;     /*删除下划线*/

 

a链接伪元素

a:link    /*未访问的链接*/
a:visited   /*访问过的链接*/
a:hover   /*鼠标经过时*/
a:active   /*在鼠标点击的同时*/

 

css     3个4个5个字两边对齐

text-align-last: justify;
text-align: justify;
text-justify:distribute-all-lines;

 

边框样式border

none    //无边框 
dotted   //边框为点线
dashed   //边框为长短线
solid    //边框为实线
double  //边框为双线

 

鼠标手形状

cursor:hand;

 

垂直对齐

vertical-align   //参数
top  //顶对齐
bottom  //底对齐
text-top   //相对文本顶对齐
text-bottom  //相对文本底对齐
baseline //基准线对齐
middle  //中心对齐
sub  //以下标的形式显示
super  //以上标的形式显示

 

css文本缩进

text-indent   // 缩进距离,12px相当于一个文字距离

 

字体样式

font-family : 宋体,sans-serif;       /*文字字体*/
font-style: itelic;      /*文字斜体*/
letter-spacing :  1pt;    /*字间距离*/

 

列表样式

list-style-type    //样式
circle    // 标记是空心圆
square   // 标记是实心方块
decimal    //标记是数字
lower-roman    //小写罗马数字
upper-roman   // 大写罗马数字

 

posted @ 2018-03-15 16:28  SultanST  阅读(178)  评论(0编辑  收藏  举报