- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我想在主 DIV
中放置 2 个垂直 DIV
时遇到问题。 background-color
值不适用于主 DIV
。我想我必须看到一些红色背景的部分。
请看一下它的jsFiddle并帮助我解决它。
最佳答案
尝试使用 clear:both
CSS 属性添加一个空的 div,或者为你的主 div 设置一个高度。
<div id="content">
<div id="float-left">Some Text floating left</div>
<div id="float-right">Some Text floating right</div>
<div id="clear"></div>
</div>
CSS 代码
#content {
background-color:red; /* The background you want */
width:500px; /* Demo: not important */
}
#float-right {
float:right;
width:300px;
padding-right:20px;
line-height:200%;
background-color:#f2f2f2
}
#float-left {
float:left;
width:50px;
background-color:#e1e1e1
}
#clear{
clear:both
}
关于css - 带有 float 元素的背景色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18460213/
更新的(未保存的)文本行有明亮的粉红色(#ffc286)背景色,更改和保存的文本行有明亮的绿色(#b5ffb5)。任何颜色样式的背景都是相同的。 我在Style Configurator中找不到它(我
这个问题在这里已经有了答案: 9年前关闭。 Possible Duplicate: Change background color of UI elements in eclipse IDE 你们可能
在构建布局时,我注意到 selectableItemBackground 的背景颜色与 UI 其余部分的背景颜色不匹配。为了缓解这种情况,我想导入 {android_sdk}/platforms/{p
我正在努力让 UITableView 后面的颜色成为我想要的灰色。 UITableView 的背景似乎工作正常,但其后面的区域仍然保持白色? 我的观点到此结束。其中只有一个单元格,并且它不是裁剪后的图
我有一个 CALayer 背景使用: CAGradientLayer *bgLayer = [BackgroundLayer blueGradient]; bgLayer.frame = self.v
我有一个水平菜单。我想在菜单周围有一个边框(不是整行,只有空间菜单被覆盖)。当我在 ul 上放置边框时,它覆盖了整行,当我在 li 上放置边框时,它在菜单项之间也有边框。
我正在使用 bootstrap 3.0,以下是我的 HTML 代码,我遇到了背景颜色问题。 HTML代码 Collection
我遇到了一个示例问题,它应该在 JQuery 中的悬停事件上更改背景颜色。(符合 .css("background-color","rgba(78, 175, 212, 0.75)");) 所有其他更
我正在尝试为我的 View 页面提供背景色,但当我想要所有内容时,它总是只给我 3/4 的页面浅蓝色。 (见截图)任何人都可以帮助我吗?非常感谢 这是我使用的CSS代码:背景.css .contain
我正在尝试为 www.livejournal.com 上的所有页面制作时尚的用户样式。我想为文本设置样式并选择具有特定背景颜色的类型输入框,但背景颜色并未在所有输入框上设置,即使 color 已设置。
我正在学习 Bootstrap。我在做一个主题。但是在页面底部,我在页脚标签处添加了页脚背景颜色,它没有改变。并且还注意到 footer 标签的类属性没有显示在 Firebug 检查元素中。出了什么问
我的 CSS 文件包含我的网页显示,网页比屏幕小(如果你知道我的意思)我试图用背景颜色填充容器的外部,但它不起作用。有人可以帮忙吗?这是我的 CSS #container { wid
我使用的是最新版本的 matlab。我正在使用带有 jet 颜色图的 imagesc 命令绘制矩阵。矩阵的背景值为零,在图像中绘制为颜色条上的最低颜色,即深蓝色。有没有办法使背景零值绘制为白色? 谢谢
我一直在研究网站以弄清楚它们是如何工作的。通过下载它们并在 dream weaver cs6 中打开。但是当我在浏览器中打开下载的 html 文件时,除了绿色背景被默认的白色背景替换之外,一切都显示正
我有两个相互重叠的文本框。第一个文本框“TextBox1”由用户输入定义。第二个“TextBox2”由自动完成功能填充。我的目标是让第一个文本框的背景仅对于已键入的文本为白色,以便生成的“TextBo
我正在尝试更改(https://developer.android.com/samples/SlidingTabsBasic/src/com.example.android.common/view/S
我有以下 RelativeLayout 但我想改进它。 (做一个漂亮的设计) .
我有一个 ImageButton,其背景图像具有一定的透明度。默认情况下,按钮在透明像素所在的位置获得灰色背景 - 由于 Holo.Light 主题。我尝试通过 setBackgroundColor(
我有一个 UITableViewController,我正在尝试自定义样式。我已经完成了 95%,但无法从单元格背景中移除奇怪的阴影。我在这个屏幕截图中突出显示了我要删除的内容: 为了尝试解决这个问题
我正在循环中以编程方式创建一些 UIButton,但我在设置按钮的背景颜色时遇到了一些问题。 按钮的颜色始终显示为白色。但是我在背景颜色中只使用 2 种颜色时效果很好。例如:红色:255 绿色:0 蓝
我是一名优秀的程序员,十分优秀!