将红色小符号改成绿色

 jQuery修改伪元素jQuery修改伪元素

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        div {
            position: relative;
            width: 90px;
            height: 90px;
            background-color: #ff0;
            
        }
        .has:after{
            position:absolute;
            content:'';
            background: #ff514c;
            width: 10px; 
            height: 10px;
            border-radius:50%;
            top: -.1rem;
            right: -.25rem;
            display: block;
        }
    </style>
</head>
<body>
    <div>
        <a href="sysMessage.html" class="point">
            <span class="ico_w has">

            </span>
            <h6 class="tit">我的消息</h6>
        </a>
    </div>  
    <script src="js/jquery-1.8.3.min.js"></script>
    <script>
        $('.point').append("<style>.has::after{background: #0ff}</style>"); 
    </script>
</body>
</html>

  

 

 

 

相关文章:

  • 2022-01-24
  • 2022-12-23
  • 2022-12-23
  • 2021-09-24
  • 2022-01-09
  • 2022-12-23
  • 2022-03-09
  • 2022-02-13
猜你喜欢
  • 2022-02-16
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2021-12-31
相关资源
相似解决方案