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

小程序的横向滚动生效需要具备以下条件
1.scroll-view 中的需要滑动的元素不可以用 float 浮动;
2.scroll-view 中的包裹需要滑动的元素的大盒子用 display:flex; 是没有作用的;
3.scroll-view 中的需要滑动的元素要用 dislay:inline-block; 进行元素的横向编排;
4.包裹 scroll-view 的大盒子有明确的宽和加上样式-->

overflow:hidden;white-space:nowrap;

文字去掉默认抛边

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 @ 2022-11-07 17:13  SultanST  阅读(64)  评论(0编辑  收藏  举报