aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/css/using_css_custom_properties
diff options
context:
space:
mode:
authorTanner Dolby <tannercdolby@gmail.com>2022-02-22 01:49:36 -0800
committerGitHub <noreply@github.com>2022-02-22 17:49:36 +0800
commit6e9fe98036090a37cc6247b873845505e5b512fb (patch)
tree5fc00117ddfd9f448eb9e8011b5bd7f6d8000e8d /files/zh-cn/web/css/using_css_custom_properties
parent70c3e11f3335e7701325f125fd712c84d6c1f9bf (diff)
downloadtranslated-content-6e9fe98036090a37cc6247b873845505e5b512fb.tar.gz
translated-content-6e9fe98036090a37cc6247b873845505e5b512fb.tar.bz2
translated-content-6e9fe98036090a37cc6247b873845505e5b512fb.zip
Removes empty <div> or <p> elements from pages (#3093)
* Removes all empty paragraph elements * Removes all empty div elements * Preserve empty div in code snippet * Preserve empty elements inside code snippets * Remove fr files which were converted into markdown * Web/CSS/transform-function/scaleX()/index.html The file is already renamed to index.md。 * remove not needed file * Resolve remaining conflict Co-authored-by: julieng <julien.gattelier@gmail.com> Co-authored-by: Masahiro FUJIMOTO <mfujimot@gmail.com>
Diffstat (limited to 'files/zh-cn/web/css/using_css_custom_properties')
-rw-r--r--files/zh-cn/web/css/using_css_custom_properties/index.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/zh-cn/web/css/using_css_custom_properties/index.html b/files/zh-cn/web/css/using_css_custom_properties/index.html
index 60ff3a2bad..5699003a1e 100644
--- a/files/zh-cn/web/css/using_css_custom_properties/index.html
+++ b/files/zh-cn/web/css/using_css_custom_properties/index.html
@@ -10,11 +10,11 @@ translation_of: Web/CSS/Using_CSS_custom_properties
---
<div><strong>自定义属性</strong>(有时候也被称作<strong>CSS变量</strong>或者<strong>级联变量</strong>)是由CSS作者定义的,它包含的值可以在整个文档中重复使用。由自定义属性标记设定值(比如: <strong><code>--main-color: black;</code></strong>),由<a href="/zh-CN/docs/Web/CSS/var">var() </a>函数来获取值(比如: <code>color: <strong>var(--main-color)</strong>;</code>)</div>
-<div></div>
+
<div>复杂的网站都会有大量的CSS代码,通常也会有许多重复的值。举个例子,同样一个颜色值可能在成千上百个地方被使用到,如果这个值发生了变化,需要全局搜索并且一个一个替换(很麻烦哎~)。自定义属性在某个地方存储一个值,然后在其他许多地方引用它。另一个好处是语义化的标识。比如,<code>--main-text-color</code> 会比 <code>#00ff00</code> 更易理解,尤其是这个颜色值在其他上下文中也被使用到。</div>
-<div></div>
+
<div>自定义属性受级联的约束,并从其父级继承其值。</div>