Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在CSS中重写after声明?_Html_Css - Fatal编程技术网

Html 如何在CSS中重写after声明?

Html 如何在CSS中重写after声明?,html,css,Html,Css,我想在css中的声明之后覆盖:中的某些属性 .common-css{ /*Some common css declation*/ } 上面的css类的内容与下面的box1和box2类中的内容相同。我不知道如何使用box1和box2中的.common css类。以及如何根据css类重写属性right 请告诉我如何使用class。common css而不是中的声明:在选择器之后,覆盖一些属性,如右侧:px 请告诉我如何有效地做到这一点 请 #box1:after{ /*Some

我想在css中的声明之后覆盖
:中的某些属性

.common-css{
     /*Some common css declation*/
}
上面的css类的内容与下面的box1和box2类中的内容相同。我不知道如何使用box1和box2中的.common css类。以及如何根据css类重写属性
right

请告诉我如何使用class
。common css
而不是
中的声明:在
选择器之后,覆盖一些属性,如
右侧:px

请告诉我如何有效地做到这一点

#box1:after{

    /*Some common css declation*/
    right: 24px;

  }


#box2:after{

    /*Some css declation*/
    right: 30px;

  }

为元素提供额外的
公共css
类。@aƞjiβ这不会影响
之后的
伪元素。@lupz,请告诉我如何使用类而不是
中的声明:之后的
selector@geeks
元素内容