diff options
author | Florian Dieminger <me@fiji-flo.de> | 2021-02-25 14:37:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-25 14:37:47 +0100 |
commit | 8879aacd682787fc20ffe2661733f9cd267c81ce (patch) | |
tree | 11bf4a1114c543989c24c7a801ba379b2c20a30c /files/zh-cn/web/css/background-blend-mode/index.html | |
parent | d1794f6b276285489b417053507f432a14be31df (diff) | |
parent | 97065b2e68dd8768dc1ea092c893c57ebe205026 (diff) | |
download | translated-content-8879aacd682787fc20ffe2661733f9cd267c81ce.tar.gz translated-content-8879aacd682787fc20ffe2661733f9cd267c81ce.tar.bz2 translated-content-8879aacd682787fc20ffe2661733f9cd267c81ce.zip |
Merge pull request #70 from peterbe/use-classhidden-not-styledisplaynone
use class="hidden" not style="display:none"
Diffstat (limited to 'files/zh-cn/web/css/background-blend-mode/index.html')
-rw-r--r-- | files/zh-cn/web/css/background-blend-mode/index.html | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/files/zh-cn/web/css/background-blend-mode/index.html b/files/zh-cn/web/css/background-blend-mode/index.html index 0a56ddcfa5..4c063163f1 100644 --- a/files/zh-cn/web/css/background-blend-mode/index.html +++ b/files/zh-cn/web/css/background-blend-mode/index.html @@ -38,7 +38,6 @@ background-blend-mode: unset; <h2 id="Examples" name="Examples">示例</h2> -<pre class="brush: html" style="display: none;"><div id="div"></div> <select id="select"> <option>normal</option> <option>multiply</option> @@ -58,14 +57,14 @@ background-blend-mode: unset; <option>luminosity</option> </select></pre> -<pre class="brush: css" style="display: none;">#div { +<pre class="brush: css" class="hidden">#div { width: 300px; height: 300px; background: url('https://mdn.mozillademos.org/files/8543/br.png'),url('https://mdn.mozillademos.org/files/8545/tr.png'); background-blend-mode: screen; }</pre> -<pre class="brush: js" style="display: none;">document.getElementById("select").onchange = function(event) { +<pre class="brush: js" class="hidden">document.getElementById("select").onchange = function(event) { document.getElementById("div").style.backgroundBlendMode = document.getElementById("select").selectedOptions[0].innerHTML; } console.log(document.getElementById('div'));</pre> |