草庐IT

background-color

全部标签

html - CSS 网格布局 : how to make background colour span multiple cells?

对于FreeCodeCamp作业,我正在CSS网格布局中制作一个iOS计算器克隆。运行它的JavaScript供以后使用;我现在专注于设计。最终结果应该是这样的:html{font-size:20px;}.wrapper{display:grid;grid-template-columns:1.2fr1fr1.2fr;grid-auto-rows:minmax(700px,auto);}.wrapper>div{padding:0;}.nested-1{display:grid;grid-template-columns:repeat(3,1fr);justify-items:cent

jquery - visibility :hidden of table-cell hides background-color of parent table-row

我有一些使用display:table-row和display:table-cell构建的表单。在Firefox52上,我可以使用visibility:hidden隐藏单元格元素,隐藏单元格但保留CSS定义的结构(而不​​是使用display:none)。虽然在Firefox64(以及chrome)上,当我隐藏单元格的可见性时,父表行在该位置失去其背景颜色。这是显示问题的片段:#tableRow{display:table-row;background-color:#f5f5f5;}.cell{display:table-cell;}#hide{visibility:hidden;}V

jquery - visibility :hidden of table-cell hides background-color of parent table-row

我有一些使用display:table-row和display:table-cell构建的表单。在Firefox52上,我可以使用visibility:hidden隐藏单元格元素,隐藏单元格但保留CSS定义的结构(而不​​是使用display:none)。虽然在Firefox64(以及chrome)上,当我隐藏单元格的可见性时,父表行在该位置失去其背景颜色。这是显示问题的片段:#tableRow{display:table-row;background-color:#f5f5f5;}.cell{display:table-cell;}#hide{visibility:hidden;}V

javascript - getComputedStyle 给出 "transparent"而不是实际的背景颜色

这是一个惊喜。下面的代码似乎没有给我屏幕上的实际颜色:h1=document.querySelector("h1");window.getComputedStyle(h1).color给出rgb(0,0,0)我认为是正确的。然而window.getComputedStyle(h1).backgroundColor给出rgba(0,0,0,0)。我在屏幕上看到的实际背景颜色是白色。我称为h1的元素在屏幕上可见。我期待得到实际的背景颜色。我在上面得到的值(在rgba中)没有错,但也不是很有用。它只是告诉我背景是完全透明的-那不是颜色。如何获取RGB中的实际背景颜色?

javascript - getComputedStyle 给出 "transparent"而不是实际的背景颜色

这是一个惊喜。下面的代码似乎没有给我屏幕上的实际颜色:h1=document.querySelector("h1");window.getComputedStyle(h1).color给出rgb(0,0,0)我认为是正确的。然而window.getComputedStyle(h1).backgroundColor给出rgba(0,0,0,0)。我在屏幕上看到的实际背景颜色是白色。我称为h1的元素在屏幕上可见。我期待得到实际的背景颜色。我在上面得到的值(在rgba中)没有错,但也不是很有用。它只是告诉我背景是完全透明的-那不是颜色。如何获取RGB中的实际背景颜色?

html - 如何使用动画更改元素 CSS 位置

我想将HTML元素的位置从静态更改为固定在浏览器窗口的顶部50%和左侧50%,但代码只会导致背景颜色发生变化!div{width:100px;height:100px;background-color:red;position:static;top:auto;left:auto;animation-name:example;animation-duration:4s;}@keyframesexample{from{background-color:red;position:static;top:auto;left:auto;}to{background-color:yellow;pos

html - 如何使用动画更改元素 CSS 位置

我想将HTML元素的位置从静态更改为固定在浏览器窗口的顶部50%和左侧50%,但代码只会导致背景颜色发生变化!div{width:100px;height:100px;background-color:red;position:static;top:auto;left:auto;animation-name:example;animation-duration:4s;}@keyframesexample{from{background-color:red;position:static;top:auto;left:auto;}to{background-color:yellow;pos

java - <h :inputText> enabled/disabled - change background color

我可以更改残疾人的背景颜色吗?我试过这样做:css包含:input:disabled{background-color:blue;}input:enabled{background-color:red;}结果是:我尝试更改背景的原因是,因为我已经安装了richfaces,禁用和启用具有相同的颜色,都是白色谢谢更新:HTML:Směna:Pracovník:richfaces生成的代码和HTML之间的图形差异: 最佳答案 试试这个 关于java-enabled/disabled-chang

java - <h :inputText> enabled/disabled - change background color

我可以更改残疾人的背景颜色吗?我试过这样做:css包含:input:disabled{background-color:blue;}input:enabled{background-color:red;}结果是:我尝试更改背景的原因是,因为我已经安装了richfaces,禁用和启用具有相同的颜色,都是白色谢谢更新:HTML:Směna:Pracovník:richfaces生成的代码和HTML之间的图形差异: 最佳答案 试试这个 关于java-enabled/disabled-chang

关于 background-attachment 属性详解

目录1、background-attachment的官方说明2、background-attachment的值3、关于个人的理解 3.1、默认值scroll3.2、fixed3.3、local4、个人总结1、background-attachment的官方说明设置背景图像是否固定或者随着页面的其余部分滚动这句话很简洁,简洁到我无法去理解,所以我决定用我自己的想法去理解。2、background-attachment的值background-attachment有三个值:scroll:背景图片随着页面的滚动而滚动,这是默认的。fixed:背景图片不会随着页面的滚动而滚动。local:背景图片会随