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切角效果,折角效果的更多相关文章

  1. CSS3实战开发: 折角效果实战开发

    <!DOCTYPE html> <html> <head> <meta charset="utf-9"> <meta name ...

  2. css 折角效果/切角效果

    首先我们先创建一个图案为100像素的斜面切角的图案 html <div class="one">12345</div> css .one{ width: 1 ...

  3. CSS 折角效果

    1 <style type="text/css"> .div1 { width: 200px; height: 200px; background-color: #ff ...

  4. CSS3图片折角效果

    本篇文章由:http://xinpure.com/css3-picture-angle-effect/ 图片折角效果主要是通过设置 border 属性实现的效果 效果预览 效果解析 假设我们将一个元素 ...

  5. CSS3知识之折角效果

    CSS3折角效果:可兼容不同背景

  6. div折角~~~

    代码: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title ...

  7. 纯CSS实现各类气球泡泡对话框效果

    原文 纯CSS实现各类气球泡泡对话框效果 一.关于纯CSS实现气泡对话框 首先,来张大图: 上边这张黄黄的,大大的,圆圆的,有个小尾巴,文字内容有些YY的图片,就是使用纯CSS实现的气泡对话框效果,一 ...

  8. CSS3实现文字折纸效果

    CSS3实现文字折纸效果 效果图: 代码如下,复制即可使用: <!DOCTYPE html> <html> <head> <title></tit ...

  9. css的img移上去边框效果及CSS透明度

    css的img移上去边框效果: .v_comment img{ height:36px; height:36px; float:left; padding:1px; margin:2px; borde ...

  10. 三角形变形记之纯css实现的分布导航条效果

    三角形变形记,用纯css实现的分布导航条效果 <style type="text/css"> ul,li { list-style-type:none; font-si ...

随机推荐

  1. spring boot MVC

    1 spring boot的用途 第一,spring boot可以用来开发mvc web应用. 第二,spring boot可以用来开发rest api. 第三,spring boot也可以用来开发w ...

  2. ng-repeat如何限制循环次数

    如果items 里有20条数据,如果你要循环 items, 只想循环5条 你可以这么做:   ng-repeat="item in items|limitTo:5"

  3. Eclipse国内下载升级方法

    Eclipse国内下载升级方法 */--> code {color: #FF0000} pre.src {background-color: #002b36; color: #839496;} ...

  4. JSP简单练习-一个简单的计数器

    在JSP中,在"<%"和"%>"之间书写的程序代码成为java程序片. 一个JSP页面中能够有多个java程序片. 要注意的是,在Java程序片中声 ...

  5. Spring学习笔记(7)——Bean的基本配置

            先从IOC说起,这个概念其实是从我们平常new一个对象的对立面来说的,我们平常使用对象的时候,一般都是直接使用关键字类new一个对象,那这样有什么坏处呢?其实很显然的,使用new那么就 ...

  6. clip-path 加边框border

    最近些项目,需求是写一个箭头图案,想着就用clip-path来写,但是写到后来发现clip-path 无法加边框,最后用了个死办法写了出来,仅供参考 下图是设计图 如下是实现方案(就是写两层,外面一层 ...

  7. Python 基础 4-1 字典入门

    引言 字典 是Python 内置的一种数据结构,它便于语义化表达一些结构数据,字典是开发中常用的一种数据结构 字典介绍 字典使用花括号 {} 或 dict 来创建,字典是可以嵌套使用的 字典是成对出现 ...

  8. socket中的绑定

  9. java——IO(普通文件,二进制文件,压缩文件 )

    二进制文件 压缩包

  10. Shell基础(三):使用for循环结构、使用while循环结构、基于case分支编写脚本、使用Shell函数、中断及退出

    一.使用for循环结构 目标: 本案例要求编写一个Shell脚本chkhosts.sh,利用for循环来检测多个主机的存活状态,相关要求及说明如下: 1> 对192.168.4.0/24网段执行 ...