Resets all styles to default values with one property. This will not affect direction and unicode-bidi properties.

  • The all property allows you to reset all styles (inherited or not) to default values.

预览

Title

Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure id exercitationem nulla qui
repellat laborum vitae, molestias tempora velit natus. Quas, assumenda nisi. Quisquam enim qui
iure, consequatur velit sit?



HTML

<div class="reset-all-styles">
  <h5>Title</h5>
  <p>
    Lorem ipsum dolor sit amet consectetur adipisicing elit. Iure id exercitationem nulla qui
    repellat laborum vitae, molestias tempora velit natus. Quas, assumenda nisi. Quisquam enim qui
    iure, consequatur velit sit?
  </p>
</div>

CSS

.reset-all-styles {
  all: initial;
}

翻译自:https://www.30secondsofcode.org/css/s/reset-all-styles