We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/mdn/css-examples/blob/master/learn/solutions.md#backgrounds-and-borders该文档中要求,使用rgba颜色为半透明的标题添加了背景颜色, background-color: rgba(0,0,0,.5);这个属性值中最后一个参数无法让文字透明(无法让标题透明)。如果让文字在背景中透明,正确的方法应该使用opacity: 0.5;这个属性!
最初学习文档是https://developer.mozilla.org/zh-CN/docs/Learn/CSS/Building_blocks/Backgrounds_and_borders玩转背景和边框中,第3个要求:给h2标题一个半透明的黑色背景颜色,并使文本为白色。但是解决方案中用了background-color: rgba(0,0,0,.5);所以这个不对的。
The text was updated successfully, but these errors were encountered:
Either the current en-US version of the test says:
Give the <h2> a semi-transparent black background color, and make the text white.
<h2>
or the current zh-CN version says:
给<h2>一个半透明的黑色背景颜色,并使文本为白色。
Both clearly suggest that it's the background instead of the text that needs to be semi-transparent, so this issue is out of misunderstanding.
@estelle or @teoli2003, could you close this issue? Thanks in advance!
Sorry, something went wrong.
Backgrounds_and_borders
👍, I think we could close this :)
Yes. This is correct. The background, not the text, should be semi-opaque.
No branches or pull requests
https://github.com/mdn/css-examples/blob/master/learn/solutions.md#backgrounds-and-borders该文档中要求,使用rgba颜色为半透明的标题添加了背景颜色, background-color: rgba(0,0,0,.5);这个属性值中最后一个参数无法让文字透明(无法让标题透明)。如果让文字在背景中透明,正确的方法应该使用opacity: 0.5;这个属性!
最初学习文档是https://developer.mozilla.org/zh-CN/docs/Learn/CSS/Building_blocks/Backgrounds_and_borders玩转背景和边框中,第3个要求:给h2标题一个半透明的黑色背景颜色,并使文本为白色。但是解决方案中用了background-color: rgba(0,0,0,.5);所以这个不对的。
The text was updated successfully, but these errors were encountered: