设置 :host 样式之后,报错:
Some selectors are not allowed in component wxss, including tag name selectors, ID selectors, and attribute selectors.(::2:1)This wxss file is ignored.
网友回复:
我试验了一下,也是报同样的错误

另外如果我想写这样的代码
.weui-cells:before{top:0;border-top:1rpx solid #d9d9d9}.weui-cells:after,.weui-cells:before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}.weui-cells:after{bottom:0;border-bottom:1rpx solid #d9d9d9} |
改成:host 如何来写呢,官方还支持
抱歉,这个是文档提前发布了的问题。稍后我们会发布新版开发者工具支持。
你好,我们已经发布了1.7.3,且文档已更新,请参考新的文档。
1.7.3 没有找到啊,新的文档还是以前的那些说明
最新的工具是 

手机上的是1.7.3
现在可以实现这样的样式吗
:host::before{top:0;border-top:1rpx solid #d9d9d9}
:host::after,
:host::before{content:" ";position:absolute;left:0;right:0;height:1px;color:#d9d9d9}
:host::after{bottom:0;border-bottom:1rpx solid #d9d9d9}
不可以的,我们现在只开放了最基本的 :host 单独使用的情况。
爱盈利-运营小咖秀(www.aiyingli.com) 始终坚持研究分享移动互联网App运营推广经验、策略、全案、渠道等纯干货知识内容;是广大App运营从业者的知识启蒙、成长指导、进阶学习的集聚平台;
想了解更多移动互联网干货知识,请关注微信公众号运营小咖秀(ID: yunyingshow)




