我有以下代码:

<div class="wpb_single_image wpb_content_element vc_align_center   team_member t_icon">
    <div class="wpb_wrapper">
        <div class="vc_single_image-wrapper vc_box_border_circle
         vc_box_border_grey">
           <img class="vc_single_image-img
            "src="http://dogcentertorino.altervista.org/wp-content/uploads/2018/12/CL-160x160.jpg" width="160" height="160" alt="CL" title="CL">
       </div>
    </div>
</div>
:after


我正在尝试将此自定义CSS分配给vc_single_image-wrapper vc_box_border_circle vc_box_border_grey

所以这里我写的CSS

 .team_member.t_icon.vc_single_image-wrapper.vc_box_border_circle
  .vc_box_border_grey:after{
    content: "";
    position: absolute;
    bottom: -18px;
    left: 50%;
    -webkit-transform: translateX(50%);
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background-image: url(../uploads/2018/12/iconimageafter.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    z-index: 100;
}


但是我不知道为什么似乎根本不阅读规则!

有什么帮助吗?
谢谢!

最佳答案

类之间没有空格,这意味着它们必须在同一类HTML调用中在一起。 t_icon之后需要一个空格

     .team_member.t_icon .vc_single_image-wrapper.vc_box_border_circle
  .vc_box_border_grey:after{
    content: "";
    position: absolute;
    bottom: -18px;
    left: 50%;
    -webkit-transform: translateX(50%);
    transform: translateX(-50%);
    width: 45px;
    height: 45px;
    background-image: url(../uploads/2018/12/iconimageafter.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center center;
    z-index: 100;
}

10-06 15:17