Hi there Yuxuan He,
Very nice to hear from you.
I can help you with this. In the English version, letās look at the first embedded sample as an example. There are two things you need to do, in each case.
1.
The macro call that creates the live sample is this:
{{EmbedLiveSample(āGradient_at_a_45-degree_angleā)}}
what it does is grab the code in the section of the document underneath the heading with an ID of āGradient_at_a_45-degree_angleā, and embed the rendered result inside an <iframe>.
If you look at the source code of the document, youāll be able to find these. There is a heading above the embedded example like so:
<h3 id=āGradient_at_a_45-degree_angleā>Gradient at a 45-degree angle</h3>
Below this heading are the following code blocks:
<div style=āwidth: 200px; height: 200px;ā></div>
div {
background: linear-gradient(135deg, red, blue);
}
These are blocks that are rendered inside the iframe.
SO
You need to update the IDs inside the macro calls in the zh-CN translation so they are equal to the zh-CN IDs, NOT the English IDs.
2.
You need to label the code blocks with the correct syntax highlighting for each one (HTML, CSS, etc.) This is done by placing your cursor inside the syntax block, and selecting the right option from the drop-down menu to the right of the āh5ā button. when you successfully apply the highlighting, it will be shown in the top right of the code block in the edit mode.
Iāve highlighted both of these in the following screenshot.
Iāve done this one for you as an example:
https://developer.mozilla.org/zh-CN/docs/Web/CSS/linear-gradient#ä»60ļ¼
ēę¢Æåŗ¦ēŗæå¼å§ēęøå