Deprecated: imwpcache\f884414bce24ee67f\f73723ec7b1919fa5::__construct(): Implicitly marking parameter $YECBGYFECGEAFWHA as nullable is deprecated, the explicit nullable type must be used instead in /www/wwwroot/www.chuangxiangniao.com/wp-content/plugins/imwpcache-dist/build/f884414bce24ee67ff73723ec7b1919fa5.php on line 2

Deprecated: imwpcache\f884414bce24ee67f\f73723ec7b1919fa5::__construct(): Implicitly marking parameter $BBWFDDBHHYHDXXAB as nullable is deprecated, the explicit nullable type must be used instead in /www/wwwroot/www.chuangxiangniao.com/wp-content/plugins/imwpcache-dist/build/f884414bce24ee67ff73723ec7b1919fa5.php on line 2
css如何设置边框透明_创想鸟

css如何设置边框透明

在css中,可以使用border属性配合rgba()设置所有边框透明;也可以使用border-top、border-right、border-bottom、border-left属性与rgba()配合设置某个边框透明。

css如何设置边框透明

本教程操作环境:windows7系统、CSS3&&HTML5版、Dell G3电脑。

css怎么让边框透明:

运用RGBA,红色和绿色和蓝色三个百分比都为200,a为参数,可以设置成0到1之间的数字,但是千万不要为负值,语法如下:

.div {    background: rgba(200,200,200,0.75);}

接下来,我们给div增加样式,首先先设置上下左右四个边框,同时设置四个边框设置相同高度和宽度,代码如下:

立即学习“前端免费学习笔记(深入)”;

div {    width: 100px;        height:100px;      border-top:10px solid  rgba(200,200,200,0.25);      border-right:10px solid  rgba(200,200,200,0.5);      border-bottom: 10px solid  rgba(200,200,200,0.75);      border-left:10px solid  rgba(200,200,200,1);}

显示效果:

1573436930169896.jpg

我们可以通过对参数的改变的,就可以调整边框的透明度,a的参数越大,就表示颜色越深,a的值为0就显示透明。

推荐学习:css视频教程

以上就是css如何设置边框透明的详细内容,更多请关注创想鸟其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/1619065.html

赞 (0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
css如何固定住元素不变
上一篇 2025年12月24日 06:31:14
css怎么设置超出自动换行
下一篇 2025年12月24日 06:31:30

相关推荐

发表回复

登录后才能评论
关注微信