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. [ACM] POJ 1218 THE DRUNK JAILER (关灯问题)

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/sr19930829/article/details/37727417 THE DRUNK JAILE ...

  2. Python之在字符串中处理html和xml

    需求:替换文本字符串中的 ‘<’ 或者 ‘>’ ,使用 html.escape() 函数 import html s="<div>你好<div>" ...

  3. 从一个url地址到最终页面渲染完成,发生了什么?

    从一个url地址到最终页面渲染完成,发生了什么? 1.DNS 解析 : 将域名地址解析为IP地址 浏览器DNS缓存 系统DNS缓存 路由器DNS缓存 网络运营商DNS缓存 递归搜索: www.baid ...

  4. Python 基础 2-1 列表入门

    引言 列表 list 是由一系列按照特定顺序排列的元素组成的,它是一种有序的数据集合. 你可以添加任何类型的元素到列表中,其中的元素之间可以没有任何关系. 列表简介 Python 使用方括号 [] 来 ...

  5. Redis ASP.NET 配置链接

    对于安装Redis后 很是不明白如何建立Redis 和 .net 的链接配置 于是查找了很多的资料 首先第一步:安装ASP.NET  NuGet 包 (ServiceStack.Redis) 安装好后 ...

  6. Dubbox服务的提供方开发

    (1)创建Maven工程(WAR)dubboxdemo-service  ,在pom.xml中引入依赖 <project xmlns="http://maven.apache.org/ ...

  7. spark算子之Aggregate

    Aggregate函数 一.源码定义 /** * Aggregate the elements of each partition, and then the results for all the ...

  8. react-router v3和v4区别

    1.默认路由 v3 <IndexRoute> v4 <Route exact> 2.授权路由 import Redirect from 'react-router-dom' & ...

  9. TreeSet集合在哪种情况下会报错

    1.自然排序中的元素对象,都必须实现了Comparable接口,否则会抛出异常,案例如下: public class MySetTree { public static void main(Strin ...

  10. 分布式项目web.xml配置文件的表头

    <?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://w ...