css切角效果,折角效果
html
<div class="one">12345</div>
<div class="two">abcde</div>
css
.one{
height: 200px;
width: 200px;
margin: 10px auto;
line-height: 200px;
background: yellowgreen;
background:
linear-gradient(-45deg,transparent 15px, yellowgreen 0)bottom right,
linear-gradient(-135deg,transparent 15px, yellowgreen 0)top right,
linear-gradient(135deg,transparent 15px, yellowgreen 0)top left,
linear-gradient(45deg,transparent 15px, yellowgreen 0)bottom left;
background-size: 50% 50%;
background-repeat: no-repeat;
}
.two{
height: 200px;
width: 200px;
margin: 10px auto;
background: #58a;
line-height: 200px;
background:
radial-gradient(circle at bottom right,transparent 15px, #58a 0)bottom right,
radial-gradient(circle at top right,transparent 15px, #58a 0)top right,
radial-gradient(circle at top left,transparent 15px, #58a 0)top left,
radial-gradient(circle at bottom left,transparent 15px, #58a 0)bottom left;
background-size: 50% 50%;
background-repeat: no-repeat;
}
acss的也可以这样写
@mixin current_color($bg,$tr){
background: $bg;
background:
linear-gradient(-45deg,transparent $tr, $bg 0)bottom right,
linear-gradient(-135deg,transparent $tr, $bg 0)top right,
linear-gradient(135deg,transparent $tr, $bg 0)top left,
linear-gradient(45deg,transparent $tr, $bg 0)bottom left;
background-size: 50% 50%;
background-repeat: no-repeat;
}
.one{
height: 200px;
width: 200px;
margin: 10px auto;
line-height: 200px;
@include current_color(yellowgreen,15px)
}
如图效果

css切角效果,折角效果的更多相关文章
- CSS3实战开发: 折角效果实战开发
<!DOCTYPE html> <html> <head> <meta charset="utf-9"> <meta name ...
- css 折角效果/切角效果
首先我们先创建一个图案为100像素的斜面切角的图案 html <div class="one">12345</div> css .one{ width: 1 ...
- CSS 折角效果
1 <style type="text/css"> .div1 { width: 200px; height: 200px; background-color: #ff ...
- CSS3图片折角效果
本篇文章由:http://xinpure.com/css3-picture-angle-effect/ 图片折角效果主要是通过设置 border 属性实现的效果 效果预览 效果解析 假设我们将一个元素 ...
- CSS3知识之折角效果
CSS3折角效果:可兼容不同背景
- div折角~~~
代码: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title ...
- 纯CSS实现各类气球泡泡对话框效果
原文 纯CSS实现各类气球泡泡对话框效果 一.关于纯CSS实现气泡对话框 首先,来张大图: 上边这张黄黄的,大大的,圆圆的,有个小尾巴,文字内容有些YY的图片,就是使用纯CSS实现的气泡对话框效果,一 ...
- CSS3实现文字折纸效果
CSS3实现文字折纸效果 效果图: 代码如下,复制即可使用: <!DOCTYPE html> <html> <head> <title></tit ...
- css的img移上去边框效果及CSS透明度
css的img移上去边框效果: .v_comment img{ height:36px; height:36px; float:left; padding:1px; margin:2px; borde ...
- 三角形变形记之纯css实现的分布导航条效果
三角形变形记,用纯css实现的分布导航条效果 <style type="text/css"> ul,li { list-style-type:none; font-si ...
随机推荐
- CTU OPEN 2017 Ice cream samples /// 尺取法
题目大意: 给定n k 接下来n行 给定n个摊位的冰淇淋信息 首先给一个t 表示这个摊位有t个冰淇淋 接下来t个数表示对应冰淇淋的品种 走到连续的几个摊位 会买下走过的摊位的所有的冰淇淋 求 要买下所 ...
- v-distpicker 一个好用的三级联动的插件
// 引入插件npm install v-distpicker --save import VDistpicker from 'v-distpicker' Vue.component('v-distp ...
- log4j 和 log4j2 在springboot中的性能对比
文章链接: https://pengcheng.site/2019/11/17/log4j-he-log4j2-zai-springboot-zhong-de-xing-neng-dui-bi/ 前言 ...
- mySQL学习入门教程——2.创建表
二.创建表 一.创建数据表的SQL语句模型(弱类型)CREATE TABLE [IF NOT EXISTS] 表名称(字段名1 列的类型[属性][索引],字段名2 列的类型[属性][索引],-字段名n ...
- layout(布局)组件
一.依赖于 Panel(面 板)组件和 resizable(调整大小)组件. 二.class加载方式 <div id="box" class="easyui- ...
- LeetCode Array Easy 1. Two Sum
Given an array of integers, return indices of the two numbers such that they add up to a specific ta ...
- shell位置参数和 shift 命令
- AtCoder ABC 131F Must Be Rectangular!
题目链接:https://atcoder.jp/contests/abc131/tasks/abc131_f 转自博客:https://blog.csdn.net/qq_37656398/articl ...
- div::before一个能插入元素的选择器
div::before一个能插入元素的选择器
- koa-artTemplate 的使用
1.父页面 <html> <head> <meta charset="UTF-8"> <title>我的音乐</title&g ...