Heim  >  Fragen und Antworten  >  Hauptteil

CSS 里面已设置的属性怎么去掉?

只能覆盖,不能改源文件。
比如原来设置postion left=0,现在想改成right=0,有什么办法?
同时设置貌似left起作用

phpcn_u224phpcn_u2242831 Tage vor1256

Antworte allen(2)Ich werde antworten

  • 数据分析师

    数据分析师2017-09-30 23:13:59

    CSS 里面已设置的属性怎么去掉?-PHP中文网问答-CSS 里面已设置的属性怎么去掉?-PHP中文网问答

    围观一下哦,学习一下。

    Antwort
    0
  • 阿神

    阿神2016-12-20 15:48:08

    自己定义的CSS文件置于需要覆盖的文件之后,同级书写。数值使用auto,其他使用对应的CSS样式(例如display)。
    或者根据CSS优先级,书写更高优先级的样式。例如原本.primary {},你的 body .primary {}。
    还有一种就是通过!important强制使用你的样式。(不建议)
    条条大路通罗马,自己选一种就好。

    Antwort
    0
  • StornierenAntwort