Using pseudo-elements such as before,after and pseudo-classes in stylus has no effect.

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


pseudo elements are two colons, and pseudo classes are one colon.
after,before is called a pseudo element, so just replace &: after with &:: after.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3d56a-44736.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3d56a-44736.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?