gpt4 book ai didi

css - Safari 边框错误

转载 作者:太空宇宙 更新时间:2023-11-04 06:21:10 27 4
gpt4 key购买 nike

我需要用渐变制作 blockquote 左边框。但在 Safari 中它显示在两侧。我试图使右边界为 0 和无。我也尝试使用 -webkit- 前缀。

这是它在 Safari 上的样子: safari和 Chrome : chrome

代码笔:https://codepen.io/domanskyi/pen/xewQNb

HTML:

<div class="content">Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempora nam itaque nesciunt omnis, ut nihil veritatis adipisci corrupti velit. Reiciendis dolorem suscipit numquam expedita iure eum labore eos maxime rerum.</div>

CSS:

body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #333;
}

.content {
width: 320px;
height: 100px;
color: #333;
background-color: #fff;
padding: 10px;

border-left-style: solid;
-webkit-border-left-style: solid;

border-width: 0 0 0 3px;
-webkit-border-width: 0 0 0 3px;

border-image: linear-gradient(to bottom, #D71F49 0%, #2E3D59 100%) 1 100%;

border-right-width: 0px !important;
-webkit-border-right-width: 0px !important;

border-right: 0px !important;
-webkit-border-right: 0px !important;

border-right: none !important;
-webkit-border-right: none !important;

border-image-repeat: none;
}

最佳答案

我看不出你的代码有什么问题,但它大大简化了它,让它在 Safari 中对我来说同样有效:https://codepen.io/RwwL/pen/JVYzox

body {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #333;
}

.content {
width: 320px;
height: 100px;
color: #333;
background-color: #fff;
padding: 10px;
border-style: solid;
border-width: 0 0 0 3px;
border-image: linear-gradient(to bottom, #D71F49 0%, #2E3D59 100%) 1 100%;
border-image-repeat: none;
}

关于css - Safari 边框错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55496930/

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