前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 ><hr>两边淡化效果。

<hr>两边淡化效果。

作者头像
xiny120
发布2020-05-18 15:28:18
3170
发布2020-05-18 15:28:18
举报
文章被收录于专栏:毛毛v5
代码语言:javascript
复制
hr.normal {
                    background: #ddd;/*改变现代浏览器下线条色*/
                    color: #ddd;/*改变IE浏览器下线条色,最好和Background-color设置一样的色*/
                    clear:both;/*可以用来清除浮动*/
                    float: none;/*取消浮动,可以不设置*/
                    width: 100%;/*显式定义宽度*/
                    height: 1px;/*改变部分浏览器下的默认高度*/
                    line-height: 1px;/*保证IE下高度效果一致,不留白色空白区*/
                    font-size: 0;/*设置为0,以确保IE6下不留空白区*/
                    border: none 0;/*取消默认边框,以背景和高度代替边框效果*/
                    margin: 0 0 1.4em;
                }

收藏一个


标签两边淡化效果css

代码语言:javascript
复制
<hr class="faded" />
            
                hr.faded {
                  clear: both; 
                  float: none; 
                  width: 100%; 
                  height: 1px;
                    line-height: 1px;
                    font-size: 0;
                    border: none 0;
                  margin: 1.4em 0;
                  border: none; 
                  background: #ddd;
                  background-image: -webkit-gradient(linear,left bottom,right bottom,color-stop(0, rgb(255,255,255)), color-stop(0.1, rgb(221,221,221)),color-stop(0.9, rgb(221,221,221)),color-stop(1, rgb(255,255,255)));
                 background-image: -webkit-linear-gradient(left center,rgb(255,255,255) 0%,rgb(221,221,221) 10%,rgb(221,221,221) 90%,rgb(255,255,255) 100%);
                  background-image: -moz-linear-gradient(left center,rgb(255,255,255) 0%,rgb(221,221,221) 10%,rgb(221,221,221) 90%,rgb(255,255,255) 100%);
                  background-image: -o-linear-gradient(left center,rgb(255,255,255) 0%,rgb(221,221,221) 10%,rgb(221,221,221) 90%,rgb(255,255,255) 100%);
                }

还有个浮雕效果

代码语言:javascript
复制
hr.carved {
                  clear: both; 
                  float: none; 
                  width: 100%; 
                  height: 2px;
                    line-height: 2px;
                    font-size: 0;
                  margin: 1.4em 0;
                  border: none 0; 
                  background: #ddd;
                  background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0.5, rgb(221,221,221)),color-stop(0.5, rgb(255,255,255)));
                  background-image: -webkit-linear-gradient(center top,rgb(221,221,221) 50%,rgb(255,255,255) 50%);
                  background-image: -o-linear-gradient(center top,rgb(221,221,221) 50%,rgb(255,255,255) 50%);
                  background-image: -moz-linear-gradient(center top,rgb(221,221,221) 50%,rgb(255,255,255) 50%);
                }
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档