当前位置: 代码网 > it编程>网页制作>Css > css实现四角边框效果

css实现四角边框效果

2024年09月24日 Css 我要评论
css实现四角边框html: <div class="box" v-for="(item, index) in coldbaseinfo.stat

css实现四角边框

 html:

   <div
            class="box"
            v-for="(item, index) in coldbaseinfo.stationmodellist"
            :key="index"
          >
            <div class="boxleft">
              <img :src="photo[index]" alt="image" />
            </div>

vue2:

  photo: [
        require("@/assets/img/bigscreen/two.jpg"),
        require("@/assets/img/bigscreen/four.png"),
        require("@/assets/img/bigscreen/five.jpg"),
        require("@/assets/img/bigscreen/ten.jpg"),
      ],

css:

.boxleft {
  background: linear-gradient(to left, #04c886, #04c886) left top no-repeat,
        linear-gradient(to bottom, #04c886, #04c886) left top no-repeat,
        linear-gradient(to left, #04c886, #04c886) right top no-repeat,
        linear-gradient(to bottom, #04c886, #04c886) right top no-repeat,
        linear-gradient(to left, #04c886, #04c886) left bottom no-repeat,
        linear-gradient(to bottom, #04c886, #04c886) left bottom no-repeat,
        linear-gradient(to left, #04c886, #04c886) right bottom no-repeat,
        linear-gradient(to left, #04c886, #04c886) right bottom no-repeat;
    background-size: 2px 10px, 10px 2px, 2px 10px, 10px 2px;
  img {
    width: 100%;
    height: 100%;
    padding: 4px;
    border: 2px solid #7fb1c580;
  } 
}

到此这篇关于css实现四角边框效果的文章就介绍到这了,更多相关css四角边框内容请搜索代码网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持代码网!

(0)

相关文章:

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

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com