微信小程序> 微信小程序text属性设置WXSS样式-手机微信小程序如何调字体-微信小程序用什么字体

微信小程序text属性设置WXSS样式-手机微信小程序如何调字体-微信小程序用什么字体

浏览量:4589 时间: 来源:a58456148
微信小程序的布局css样式参考自珺L文字1.

width:fit-content;font-size:20px;/*设置文字字号*/color:red;/*设置文字颜色*/font-weight:bold;/*设置字体加粗*/border:1pxsolidred;/*添加边框样式(粗细为1px,颜色为红色的实线)*/

2.

font-family:"宋体";/*设置字体为宋体*/

3.

----------------------------------------------------------------------------------------

排版4.

font-style:italic;/*文字排版--斜体*/text-decoration:underline;/*文字排版--下划线*/text-decoration:line-through;/*文字排版--删除线*/text-indent:2em;/*段落排版--缩进*/line-height:1.5em;/*段落排版--行间距(行高)*/letter-spacing:50px;/*段落排版--中文字间距*/word-spacing:50px;/*字母间距*/

5.

text-align:center;right;left;/*段落排版--对齐*/

6.

----------------------------------------------------------------------------------------

元素7.

display:inline-flex;/*将对象作为内联块级弹性伸缩盒显示*/display:block;/*设置为块状元素*/display:inline;/*设置为内联元素*/

8.

display:inline-block;/*设置为内联块状元素*/

9.

-----------------------------------------------------------------------------------------

换行与位置10.

word-break:keep-all;/*不换行*/white-space:nowrap;/*不换行*/vertical-align:middle;/*把此元素放置在父元素的中部。*/

11.

-----------------------------------------------------------------------------------------

边框12.

border-style(边框样式)常见样式有:(border-color,border-width)边框相关设置dashed(虚线)|dotted(点线)|solid(实线)。border-bottomborder-topborder-rightborder-left上下左右线单独设置

13.

-----------------------------------------------------------------------------------------

上下左右边距14.

box-sizing:border-box;//当使用padding的时候不影响大小padding-toppadding-rightpadding-bottompadding-leftmargin-topmargin-rightmargin-bottommargin-left(margin:10px10px10px10px;top、right、bottom、left)

版权声明

即速应用倡导尊重与保护知识产权。如发现本站文章存在版权问题,烦请提供版权疑问、身份证明、版权证明、联系方式等发邮件至197452366@qq.com ,我们将及时处理。本站文章仅作分享交流用途,作者观点不等同于即速应用观点。用户与作者的任何交易与本站无关,请知悉。

  • 头条
  • 搜狐
  • 微博
  • 百家
  • 一点资讯
  • 知乎