gpt4 book ai didi

html - CSS 中的边框图像问题

转载 作者:行者123 更新时间:2023-11-28 11:09:41 25 4
gpt4 key购买 nike

当我尝试在我的网站中使用 border-image 使我们的 Logo 显示为边框时,图像甚至不会显示在页面上。它在我尝试的任何浏览器中都不起作用,并且图像位于同一文件夹中。我确定我正在修改正确的 div,因为当我添加 border-radius 时,边框会变圆。我真的不知道我做错了什么,所以我很感激任何帮助。这是 CSS 中的 div:

#outer_container {
height: 1495px;
width: 925px;
margin-right: auto;
margin-left: auto;
background-repeat: repeat-x;
background-attachment: fixed;
background-color: #E7EAF5;
border-style: solid;
border-width: 38px 0px 0px;
-moz-border-image: url(logo.gif) 81 0 repeat stretch;
-webkit-border-image: url(logo.gif) 81 0 repeat stretch;
-o-border-image: url(logo.gif) 81 0 repeat stretch;
border-image: url(logo.gif) 81 0 fill repeat stretch;
}

最佳答案

如图所示 here , 根据 W3和亚历克斯·罗赞斯基:

Partial URLs are interpreted relative to the source of the style sheet, not relative to the document.

如果您考虑一下,这是有道理的,因为 CSS 文件可以添加到不同目录中的页面,因此将其标准化为 CSS 文件意味着 URL 将在添加样式表的任何地方工作。

关于html - CSS 中的边框图像问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22072758/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com