- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我是 HTML 和 CSS 的新手,我一直在努力弄清楚我整晚做错了什么。
我想将 id="transparentBox"的 div
的背景颜色设置为不同的颜色(最终是一个带有一些当前未知的不透明度设置的灰白色框)但是,看起来因为认为我通过 CSS 应用的样式没有起到作用。如有任何建议,我们将不胜感激。
我已经在我的 HTML 上设置了背景,现在如何将一个 id 的背景设置为不同的颜色?
html
{
text-align: center;
background: linear-gradient(to top right, #33ccff 0%, #0066ff 100%) fixed;
}
body
{
text-align: center;
}
p
{
text-align: left;
}
.off
{
color: #F0FFFF;
}
#header
{
height:100px;
width:960px;
}
#header h1
{
position: relative;
text-align: left;
color: #000000;
font-size: 45px;
left: 5px;
top: 20px;
}
body
{
margin: 0px;
padding: 0px;
text-align: left;
font: 12px Arial, Helvetica, sans-serif;
font-size: 14px;
}
#navigationBar
{
height: 40px;
background-color: #F0FFFF;
border-color: #000000;
}
ul
{
list-style-type: none;
margin: 0px;
padding: 0px;
overflow: hidden;
background-color: #333;
}
li
{
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding-top: 13px;
padding-bottom: 13px;
padding-left: 15px;
padding-right: 15px;
text-decoration: none;
}
/* Change the link color to #111 (black) on hover */
li a:hover
{
background-color: #111;
}
.active
{
background-color: #4CAF50;
}
#navigationMenu
{
margin-top: 0px;
height: auto;
background-color: #F0FFFF;
border-color: #000000;
border-radius: 25px;
}
#transparentBox
{
position: relative;
display: block;
margin: 10px;
padding: 10px;
width: 500px;
height: 400px;
background-color: #FFFFFF;
border-color: #000000;
border-radius: 10px;
}
<!DOCTYPE html>
<html xmlns="http://www.calebwolff.us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="refresh" content="30" />
<link rel="stylesheet" type="text/css" href="style.css" />
<title>Caleb Wolff's Personal Website</title>
</head>
<body>
<div id="header">
<h1>Caleb<span class="off">Wolff</span></h1>
</div>
<div id="navigationBar">
<ul>
<li><a href="http://www.calebwolff.us">Home</a></li>
<li><a href="https://www.facebook.com/calebwolffmusic/">Facebook</a></li>
</ul>
</div>
<div id="transparnetBox">
<h1>HELLLOOO</h1>
</div>
</body>
</html>
最佳答案
改变背景有两种方法
正常改变颜色,没有阴影
html
{
文本对齐:居中;
背景:线性渐变(右上角,#33ccff 70%,#0066ff 100%)已修复;
}
使用渐变色改变颜色您应该使用 6 位颜色代码更改 html 样式中的颜色html
有可用的颜色代码列表,这些颜色的不透明度以百分比设置。您可以尝试这两种方法中的任何一种。
{
文本对齐:居中;
背景:线性渐变(右上角,#33ccff 70%,#0066ff 100%)已修复;
关于html - 我已经在我的 html 上设置了背景,现在如何将一个 id 的背景设置为不同的颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45125752/
一段时间以来,我一直在做这个反复出现的噩梦(阅读 - 我的应用程序中的错误)。出于某种原因,某个计时器在我停止后继续发送“Elapsed”事件,即使 在事件本身 计时器“承认”已被禁用!检查一下: /
为了找到 2 个 git 分支的共同祖先,需要做的是: git merge-base branch another_branch 好的。但是……如果两个分支都已经 merge 了怎么办?当我在这种情况
关闭。这个问题是opinion-based .它目前不接受答案。 想改进这个问题?更新问题,以便 editing this post 可以用事实和引用来回答它. 1年前关闭。 Improve this
我想要一个相机 View ,可以将图像捕获到本地文件或让用户从本地照片库中选择图像。我想也许有人为此编写了很好的库/代码。也许我可以利用它。已经有好的了吗?谢谢。我只是避免重新发明轮子:) 最佳答案
我从 master 分支创建了一个功能分支。之后有来自功能分支的提交 [F1]。 [F1] -- Feature Branch / [M1]-[M2
我喜欢使用 .NET 进行编程,尤其是 C# 3.0、.NET 3.5 和 WPF。但我特别喜欢的是 Mono .NET 确实与平台无关。 现在我听说了 Mono 中的 Olive 项目。我找不到某种
介绍和搜索 所以我认为我犯了一个严重的错误,我很担心。我已经分析了独立负责人的论坛,我已经接近找到答案,但场景太具体,不适用于我所在的位置。如果您找到可以回答我的问题的特定主题,请链接我。 例如:Ho
我有一个类似于下图的提交图。标记为 * 的提交表示大量提交。 A* | B--------- | | C* D* master 和 cor
我喜欢使用 .NET 进行编程,尤其是 C# 3.0、.NET 3.5 和 WPF。但我特别喜欢的是 Mono .NET 确实与平台无关。 现在我听说了 Mono 中的 Olive 项目。我找不到某种
我们最近接手了一个 .NET 项目,在查看 db 后,我们在某些列中有以下内容: 1)某些列具有诸如" & etc etc 2) 有些有 标签和其他非 html 编码的标签 这些数据
你好,当我导航到应用程序中的另一个页面时出现此错误 我不知道为什么这个错误出现 #0 _AsyncCompleter.complete (dart:async/future_impl.da
我使用以下 C 算法计算数据的 CRC32: #define CRC32_POLYNOM_REVERSED 0xEDB88320 uint32 calcCrc32(uint8* buffer, u
我试图在我的一个测试中断言模型中的字段没有改变。我知道从哲学上这是不正确的,但由于我控制了我需要知道的所有变量,所以我只想检查我的数据库条目是否没有改变。 我愿意接受一个解决方案,该解决方案可以将其转
我是 GitHub 的新手。并通过 Eclipse 使用它我们是两个人在开发一个应用程序。当我在 Git shell 中检查 git status 时,我得到以下状态。 On branch maste
简单代码: std::ifstream file("file.txt"); std::string line; while(getline(file,line)) ; //exhaust file
是的,我又找不到这个 Gradle DSL 方法:'compile()' 问题。 我检查了我有: buildscript { repositories { jcenter()
HTML: articles CSS: #main_menu { float: left; padding-top: 10px; vertical-align: m
我是一名优秀的程序员,十分优秀!