problem description
before,after and other pseudo-elements and pseudo-classes have no effect
the environmental background of the problems and what methods you have tried
Project framework: iview + vue + stylus sets up the background system, and cannot write the effects of pseudo elements and pseudo classes in stylus, such as .clearfix: after and other:: before:: after you want to use, etc.
thought it was iview.css "s problem, it is still useless to comment out the iview.css introduced in main.js
related codes
/ / Please paste the code text below (do not replace the code with pictures)
.clearfix
height 1%
zoom 1
clear: both
overflow: hidden
&:after
content: " "
display:block
height:0
visibility:hidden
font-size:0
clear:both
overflow: hidden
.top-info
margin-bottom: .3rem
&>span
position: relative
display: inline-block
font-size: .2rem
color: -sharp333333
margin-left: .4rem
&:first-of-type
margin-left: 0
&:before
/*position: absolute*/
content: "hello"
/*display: inline-block*/
color: $warning
/*width: .3rem*/
/*height: .3rem*/
font-size: .3rem
background:$warning
what result do you expect? What is the error message actually seen?
check whether the element generates pseudo-classes under the element tag of the console, but there is no