我正在使用此代码在我的菜单后添加一个渐变,以使它们弹出更多。如何让这个渐变透明?
-webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.65)));
我需要我的网页的背景是透明的(这样我就可以看到它背后的东西)。我如何使用它来保持我的菜单的重点,但做到这一点,我仍然可以看到它背后的内容?
我正在使用此代码在我的菜单后添加一个渐变,以使它们弹出更多。如何让这个渐变透明?
-webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0.65)));
我需要我的网页的背景是透明的(这样我就可以看到它背后的东西)。我如何使用它来保持我的菜单的重点,但做到这一点,我仍然可以看到它背后的内容?
目前的语法是:
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.65));
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.65));
EG。
html {
height: 100%;
background: lightblue;
}
body {
margin: 0;
min-height: 100%;
background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.65));
}
你的问题的其余部分是不是很......啊哈,清晰。
真棒的例子!我很感激!清除问题的其余部分基本上是这样......想象一下你刚刚制作的HTML页面底部,有白色菜单。这是否允许您用透明替换“lightblue”并查看应用程序后面发生的任何事情? –
这听起来像你需要一个*覆盖* ...但不知道到底是你在做什么,这很难做进一步的评论。听起来像是一个新问题。 –
你应该先用现在的语法测试没有供应商的前缀,除非你正在运行一个旧的浏览器... –