使用微信小程序开发,让微信支持HTML5的标签 WECHAT

shuke 2017-11-4 1556

本身来讲微信小程序不支持HTML5的标签;

但是也不是完全排斥

所以只要在样式里面定义好H5标签的样式还是可以满足微信小程序使用H5的标签的;

你可以把以下标签放到你的APP.WXSS里就可以了

重点要说的是,H1...H6在微信小程序里是会报错的,也不支持HTML4的标签写法;

div,p,header,nav,article,section,aside,footer,figure,figcaption,ul,li,ol,dt,dd,dl,table,tr,caption,address,block,quote,pre,br,hr,hgroup{display: block}
span,td,font{display: inline}
table{display: table}
talbe td,table th{display: table-cell}
hr{border-bottom:solid 1px gray}
input{background-color: white;text-rendering: auto;color: initial;   text-transform: none;    text-indent: 0px;    text-shadow: none;    display: inline-block;    text-align: start;         font: 13.3333px Arial;    user-select: text;       padding: 1px 0;    border-width: 2px;    border-style: inset;border-color: initial;    border-image: initial;}
b,strong{font-weight: bold}
del{text-decoration: line-through}
i,em{font-style:italic}
u{text-decoration: underline}
a{color:darkblue}
small{font-size:85%}
big{font-size: 125%}
最新回复 (1)
全部楼主
  • shuke 2017-11-6
    2

    2.0 优化版本

    div,p,header,nav,article,section,aside,footer,figure,figcaption,ul,li,ol,dt,dd,dl,table,tr,caption,address,block,quote,pre,br,hr,hgroup{display: block}
    span,td,font{display: inline}
    table{display: table;background:#efefef}
    talbe td,table th{display: table-cell;}
    hr{border-bottom:solid 1px gray}
    input{background-color: white;text-rendering: auto;color: initial;   text-transform: none;    text-indent: 0px;    text-shadow: none;    display: inline-block;    text-align: start;         font: 13.3333px Arial;    user-select: text;       padding: 1px 0;    border-width: 2px;    border-style: inset;border-color: initial;    border-image: initial}
    b,strong{font-weight: bold}
    del{text-decoration: line-through}
    i,em{font-style:italic}
    u{text-decoration: underline}
    a{color:darkblue}
    small{font-size:85%}
    big{font-size: 125%}
    hl,hm,hs,h{display: block;font-weight: bold}
    hl{font-size: 150%;}
    hm{font-size: 120%;}
    hs{font-size: 110%;}


返回