为了账号安全,请及时绑定邮箱和手机立即绑定

边框的这种效果是怎么实现的啊

边框的这种效果是怎么实现的啊

12345678_0001 2019-01-30 15:53:01
查看完整描述

1 回答

?
潇潇雨雨

TA贡献1833条经验 获得超4个赞

css
 .rect {
      position: absolute;
      top: 20px;      left: 20px;
      width: 100px;
      height: 100px;
      text-align: center;
      line-height: 100px;
      background: linear-gradient(to left, #f00, #f00) left top no-repeat,
        linear-gradient(to bottom, #f00, #f00) left top no-repeat,
        linear-gradient(to left, #f00, #f00) right top no-repeat,
        linear-gradient(to bottom, #f00, #f00) right top no-repeat,
        linear-gradient(to left, #f00, #f00) left bottom no-repeat,
        linear-gradient(to bottom, #f00, #f00) left bottom no-repeat,
        linear-gradient(to left, #f00, #f00) right bottom no-repeat,
        linear-gradient(to left, #f00, #f00) right bottom no-repeat;
      background-size: 1px 20px, 20px 1px, 1px 20px, 20px 1px;
    }
    
html
  <div class="rect">游戏首页</div>


查看完整回答
反对 回复 2019-01-30
  • 1 回答
  • 0 关注
  • 517 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信