css - 背景:url work如何CSS速记

标签 css

我正在尝试修改来自 oracle 的应用程序的 css。我正在尝试破译下面的 css 条目。 特别是我有兴趣发现 49% -165px 确实如此。是X和Y坐标吗?

.siebui-self-service {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: url('../../../images/custom/image.jpg') no-repeat 49% -165px;
background-color: #8aaeba;

最佳答案

49% 是指从右边开始的位置,-165px 是指从顶部开始的位置。

background 属性是所有基于背景的属性的简写,语法如下:

background: color image repeat position;

在哪里

background-color 例如#FFFFFF

背景图像 例如url("image.png")

background-repeat 例如不重复

background-position 例如49% -165px 指右/上

来自 w3schools:

It does not matter if one of the property values is missing, as long as the ones that are present are in this order.

关于css - 背景:url work如何CSS速记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31992423/

相关文章:

html - 如何使用 flex 为所有 div 获得相同的高度?

html - ie8 - 当宽度为 :100% 时边框添加到最大宽度

jquery - 水平单选按钮 960 网格 - jQuery mobile

html - 自动换行链接,使其不会溢出其父 div 宽度

html - IE 类 :active with image not working

javascript - 使用 JS 生成多个 html 元素时,最有效的样式设置方式是什么?

css - Bootstrap 网格系统不适用于表格

php - Wordpress:尝试制作一个静态空白页面来显示我的 2014 模板的页眉/侧边栏/页脚

css - 在 Internet Explorer 9 中使用 CSS 对齐 Div 列表中的文本

html - 移动版 bootstrap 4.2.1 上的间距