css给盒子写四个角

如图:之前一直用定位 现在发现可以用css写

background: linear-gradient(to top, #306eef, #306eef) left top no-repeat,

/*上左*/ linear-gradient(to right, #306eef, #386eef) left top no-repeat,

/*左上*/ linear-gradient(to left, #386eef, #306eef) right top no-repeat,

/*上右*/ linear-gradient(to bottom, #306eef, #306eef) right top no-repeat,

/*上右*/ linear-gradient(to left, #386eef, #386eef) left bottom no-repeat,

/* */ linear-gradient(to bottom, #386eef, #306eef) left bottom no-repeat,

/*左下*/ linear-gradient(to top, #396eef, #396eef) right bottom no-repeat,

/* 石*/ linear-gradient(to left, #306eef, #306eef) right bottom no-repeat; /*右下*/

background-size: 2px 16px, 16px 2px, 2px 16px, 16px 2px;

顺便记录一下给单数盒子变色

.table-body:nth-child(odd) {

background: rgba(97, 156, 249, 0.5);

}

最后再记录一下给某个盒子隐藏下滑条

.tableBody::-webkit-scrollbar {

width: 0;

}

相关推荐
Byron070721 分钟前
Vue 中使用 Tiptap 富文本编辑器的完整指南
前端·javascript·vue.js
css趣多多37 分钟前
地图快速上手
前端
zhengfei61141 分钟前
面向攻击性安全专业人员的一体化浏览器扩展程序[特殊字符]
前端·chrome·safari
码丁_1171 小时前
为什么前端需要做优化?
前端
Mr Xu_1 小时前
告别硬编码:前端项目中配置驱动的实战优化指南
前端·javascript·数据结构
Byron07072 小时前
从 0 到 1 搭建 Vue 前端工程化体系:提效、提质、降本实战落地
前端·javascript·vue.js
哆啦code梦2 小时前
前端存储三剑客:localStorage、sessionStorage与Cookie解析
前端·前端存储
徐小夕@趣谈前端2 小时前
Web文档的“Office时刻“:jitword共建版2.0发布!让浏览器变成本地生产力
前端·数据结构·vue.js·算法·开源·编辑器·es6
Data_Journal2 小时前
如何使用 Python 解析 JSON 数据
大数据·开发语言·前端·数据库·人工智能·php
德育处主任Pro2 小时前
纯前端网格路径规划:PathFinding.js的使用方法
开发语言·前端·javascript