gpt4 book ai didi

css - 在
的所有四个边上使用线性渐变

转载 作者:行者123 更新时间:2023-12-05 00:56:01 25 4
gpt4 key购买 nike

我正在尝试使用线性渐变来设计一个盒子的样式。我想要在所有四个边上从红色到白色有 7px 的淡入淡出。到目前为止,我的一侧(底部)工作正常,没有问题:

background: -webkit-linear-gradient(bottom, white, #eb3136 7px); 
background: -o-linear-gradient(bottom, white, #eb3136 7px);
background: -moz-linear-gradient(bottom, white, #eb3136 7px);
background: linear-gradient(bottom, white, #eb3136 7px);

我如何让 7px 的淡入淡出在其他三个边上书写?

感谢您的帮助。

最佳答案

box-shadow: 0px 0px 7px #eb3136 inset;

可能会以更简单的方式完成您想要的操作。

fiddle :http://jsfiddle.net/6EREc/

关于css - 在 <div> 的所有四个边上使用线性渐变,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24768530/

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