gpt4 book ai didi

html - 火狐 15 : div content spilling to border-image

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

首先,我知道 Firefox 15 中取消了 -moz-border-image 的前缀,如下所述: http://dbaron.org/log/20120612-border-image .在这方面,我修复了我的 CSS 以与 Firefox 15 一起使用。我的问题是不同的(虽然可能是切线的)。

简而言之,在 Firefox 15 中,带有边框图像的 div 的内容现在与所述边框图像重叠,就好像边框是 div 内部的一部分一样。其他浏览器不显示问题并按预期运行,这使我无法简单地用填充补偿边框(其他浏览器将有过多的填充)。

我该如何解决这个问题?谢谢!

参见 example

我的代码:

<style type="text/css">

body { background: yellow; }

.borderbox {
-moz-border-image: url(border_sprite.png) 31 25 25 20 / 31px 25px 25px 20px repeat stretch;
-webkit-border-image: url(border_sprite.png) 31 25 25 20 fill repeat stretch;
-o-border-image: url(border_sprite.png) 31 25 25 20 repeat stretch;
border-image: url(border_sprite.png) 31 25 25 20 fill repeat stretch;
border-width: 31px 25px 25px 20px;
border-image-width: 31px 25px 25px 20px;
padding: 0 10px 20px 0;
text-align: right;
overflow: auto;
width: 400px;
height: 400px;
color: purple;
font-size: 20px;
}

</style>

<!DOCTYPE html>
<head></head>
<body>

<div class="borderbox">
the content should be bound to the inner white box. Why does it also cover the blue border in Firefox 15?
</div>

</body>
</html>

最佳答案

终于找到了答案 - 如此简单(但看似随意)。将以下属性添加到 div 的样式中:

border-style: solid;

关于html - 火狐 15 : div content spilling to border-image,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12544271/

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