简体   繁体   English

背景图像无重复位置:右未出现。 图片参考确定。 是什么赋予了?

[英]background-image no-repeat position: right not appearing. Image reference OK. What gives?

I have a really noob question but since I can't get it to work I need to ask anyway. 我确实有一个新手问题,但是由于无法正常工作,我还是要问。 This exact same code works on my other site. 这个完全相同的代码可在我的其他网站上使用。 So why isn't this code displaying the separator to the right of the header? 那么,为什么这段代码没有在标题的右侧显示分隔符呢?

http://jsfiddle.net/jay_t55/2g13bfz2/1/ http://jsfiddle.net/jay_t55/2g13bfz2/1/

<header>
    <h1>Assessment Site</h1>
    <h2>Welcome...</h2>
</header>

header
{    
    width: 100%;
    height: 100%;

    padding-top: 30%;

    border-image: url("http://i.imgur.com/2jE2sDU.png");
    background-repeat: no-repeat;
    background-position: right;
}

header > h1, h2
{
    font-size: 22pt;
    color: #131313;

    margin-left: 25%;
}

Your code says 'border-image', change that to 'background-image'. 您的代码显示为“边框图像”,将其更改为“背景图像”。

The background-position entry should have two arguments in it as well. 背景位置条目也应包含两个自变量。 Horizontal and vertical. 水平和垂直。 I've added center as the vertical. 我添加了中心作为垂直。

header
{    
    width: 100%;
    height: 100%;
    padding-top: 30%;
    background-image: url("http://i.imgur.com/2jE2sDU.png");
    background-repeat: no-repeat;
    background-position: right center;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM