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;
  } 
 
}
相关推荐
lifewange10 小时前
UI自动化页面元素定位有几种方式
前端·ui·自动化
牛奶10 小时前
2026 春涧·前端走向全栈
前端·人工智能·全栈
Piper蛋窝10 小时前
AI 有你想不到,也它有做不到 | 2025 年深度使用 Cursor/Trae/CodeX 所得十条经验
前端·后端·代码规范
LYFlied11 小时前
WebAssembly为何能实现极致性能:从设计原理到执行优势
前端·wasm·跨端
释怀不想释怀12 小时前
vue布局,动态路由
前端·html
桜吹雪12 小时前
Vue 基础:状态管理入门
前端·vue.js
JavaGuide12 小时前
利用元旦假期,我开源了一个大模型智能面试平台+知识库!
前端·后端
yuanyxh13 小时前
程序设计
前端·设计
eason_fan13 小时前
前端性能优化利器:LitePage 轻量级全页设计解析
前端·性能优化·前端工程化
pe7er14 小时前
如何阅读英文文档
java·前端·后端