微信小程序的布局css樣式


微信小程序的布局css樣式
width: fit-content;
font-size:20px;      /*設置文字字號*/
color:red;           /*設置文字顏色*/
font-weight:bold;    /*設置字體加粗*/
border:1px solid red;/*添加邊框樣式(粗細為1px, 顏色為紅色的實線)*/
font-family:"宋體";   /*設置字體為宋體*/

font-style:italic;    /*文字排版--斜體*/
text-decoration:underline;   /*文字排版--下划線*/
text-decoration:line-through;/*文字排版--刪除線*/
text-indent:2em;             /*段落排版--縮進*/
line-height:1.5em;           /*段落排版--行間距(行高)*/
letter-spacing:50px;         /*段落排版--中文字間距*/
word-spacing:50px;           /*字母間距*/
text-align:center;  right ; left ;  /*段落排版--對齊*/

display:inline-flex;        /*將對象作為內聯塊級彈性伸縮盒顯示*/
display:block;              /*設置為塊狀元素*/
display:inline;             /*設置為內聯元素*/
display:inline-block;       /*設置為內聯塊狀元素*/

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

border-style(邊框樣式)常見樣式有:  (border-color,border-width) 邊框相關設置
dashed(虛線)| dotted(點線)| solid(實線)。
border-bottom border-top border-right border-left 上下左右線單獨設置

box-sizing: border-box; //當使用padding的時候不影響大小
padding-top padding-right padding-bottom padding-left
margin-top margin-right margin-bottom margin-left (margin:10px 10px 10px 10px; top、right、bottom、left)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM