CSS-使用background实现四个角边框
使用background实现四个角边框。
CSS
.question_title_content {background: linear-gradient(to left, rgba(51, 51, 51, 1), rgba(51, 51, 51, 1)) left top no-repeat, linear-gradient(to bottom, rgba(51, 51, 51, 1), rgba(51, 51, 51, 1)) left top no-repeat, linear-gradient(to left, rgba(51, 51, 51, 1), rgba(51, 51, 51, 1)) right top no-repeat,linear-gradient(to bottom, rgba(51, 51, 51, 1), rgba(51, 51, 51, 1)) right top no-repeat, linear-gradient(to left, rgba(51, 51, 51, 1), rgba(51, 51, 51, 1)) left bottom no-repeat,linear-gradient(to bottom, rgba(51, 51, 51, 1), rgba(51, 51, 51, 1)) left bottom no-repeat,linear-gradient(to left, rgba(51, 51, 51, 1), rgba(51, 51, 51, 1)) right bottom no-repeat,linear-gradient(to left, rgba(51, 51, 51, 1), rgba(51, 51, 51, 1)) right bottom no-repeat;/*设置大小*/background-size: 0.15rem 0.6rem, 0.6rem 0.15rem, 0.15rem 0.6rem, 0.6rem 0.15rem;
}
HTML
<div class="question_title_content describe2">内容</div>
效果:
CSS-使用background实现四个角边框相关推荐
- html边框颜色线性渐变,CSS线性渐变linear-gradient() 函数实现div边框四角样式
先看下要实现的效果. 四个角边框高亮 css代码实现 红色框box-red样式,蓝色的只是变换了颜色.box-title是图上渐变实现. .box-red { background: linear-g ...
- css 实现边框四个角效果
<div class="bottom"><!-- 四个角的边框效果 --><div class="border_corner border_ ...
- 01.个人项目难点汇总2 css定制科技感缺角边框
01.CSS3实现缺角矩形,折角矩形以及缺角边框 前言 前几天偶然看到缺角矩形这个功能,脑袋中第一想法是,搞个绝对定位的伪元素,哪里需要挡哪里,或者找UI小哥聊聊天,忽然灵光一闪,想起之前翻过的< ...
- html圆角半径,CSS3 / 绘制四个角不同半径的圆角边框 - 汇智网
绘制四个角不同半径的圆角边框 如果要绘制的圆角边框四个角半径各不相同,可以将border-top-left-radius属性.border-top-right-radius属性.border-bott ...
- html背景图片带边框,css 使用background背景实现border边框效果
css中,我们一般使用border给html元素设置边框,但也可以使用background背景来模拟css边框效果,本文章向大家介绍css 使用background背景实现border边框效果,需要的 ...
- 基于CSS mask和clip-path实现切角的技巧
本文翻译自 Tricks to Cut Corners Using CSS Mask and Clip-Path Properties,略有删改 原作者:Temani Afif 我们最近使用CSS m ...
- CSS进阶(一)背景与边框
CSS进阶(一)背景与边框 文章目录 CSS进阶(一)背景与边框 一.浏览器前缀 二.CSS编码技巧 1.尽量减少代码重复(可复用性) (1)当某些值相互依赖时,应该把他们的相互关系用代码表示出来 ( ...
- 原来CSS的background还可以这么玩
身为一个前端开发者,背景是开发中的常客.大到整个网站的主题背景,小到一个按钮的背景.CSS 的 background 属性基本上每天开发都会遇到,绝大多数情况下我们都只会使用到了纯色背景或者图片背景. ...
- css button 四种状态,css中按钮的四种状态
css中按钮有四种状态 普通状态 hover 鼠标悬停状态 active 点击状态 focus 取得焦点状态 .btn:focus{outline:0;} 可以去除按钮或a标签点击后的蓝色边框 下面的 ...
最新文章
- linux配置java环境变量(详细)
- 【LDA学习系列】LDA-Python库
- 开发人员如何学习 Kubernetes
- linux设备模型之kset/kobj/ktype分析
- 分析log及校准学习总结
- c语言遍历文件内容_C/C++编程笔记:C语言开发电脑益智游戏【扫雷】(源代码分享)...
- Java中使用JNA实现全局监听Linux键盘事件
- Python编程常见错误表现形式与原因分析
- android网络请求库volley方法详解
- BOM知识点全面总结(附实例、图解)
- java word中插入图片_在Word文档中插入图片
- Day03 BSP工程师小白的第一步-------今天开始正式学C语言
- android 中文编码
- 51单片机 | 单片机工程模板创建
- 神奇的验证码,我们一起来探究
- 【LabVIEW花样翻新】前言
- 【已解决】Something went wrong. If this issue persists please contact us through our help center at help.
- 基于51单片机定时宠物投喂自动喂食器
- 交流桩CP信号充电流程
- TP、FN、FP、TN、准确率、召回率、F1