CSS

语言:

CSSSCSS

确定

.test {

float: left;

overflow: hidden;

position: relative;

margin: .25em;

height: 14em;

width: 27em;

box-shadow: 0 0 .125em #777;

font: 1em/14 monospace;

text-align: center;

white-space: pre-wrap;

}

.test:before,

.test:after {

position: absolute;

top: 0;

right: 0;

bottom: 0;

left: 0;

}

.test:before {

box-sizing: border-box;

border: solid 1em #c73a11;

padding: 1em;

background: #ddd;

background-clip: content-box;

content: '';

}

.test--clip-path-inset:nth-child(1):after {

content: 'no clipping applied';

}

.test--clip-path-inset:nth-child(2) {

/* all (top, right, bottom, left) */

}

.test--clip-path-inset:nth-child(2):before {

-webkit-clip-path: inset(8px);

}

.test--clip-path-inset:nth-child(2):after {

content: "inset(8px)";

}

.test--clip-path-inset:nth-child(3):before {

-webkit-clip-path: inset(-1em 15%);

}

.test--clip-path-inset:nth-child(3):after {

content: "inset(-1em 15%)";

}

.test--clip-path-inset:nth-child(4):before {

-webkit-clip-path: inset(-1em 2vw calc(50% - 1vmin));

}

.test--clip-path-inset:nth-child(4):after {

content: "inset(-1em 2vw calc(50% - 1vmin))";

}

.test--clip-path-inset:nth-child(5):before {

-webkit-clip-path: inset(4vh 15% 3vh -1vmax);

}

.test--clip-path-inset:nth-child(5):after {

content: "inset(4vh 15% 3vh -1vmax)";

}

.test--clip-path-inset:nth-child(6) {

/* 50% top + 50% bottom = 100% height */

}

.test--clip-path-inset:nth-child(6):before {

-webkit-clip-path: inset(50% 1px);

}

.test--clip-path-inset:nth-child(6):after {

content: "inset(50% 1px)";

}

.test--clip-path-inset:nth-child(7) {

/* calc(50% + 30vmin) right + calc(50% + 30vmin) left > 100% width */

}

.test--clip-path-inset:nth-child(7):before {

-webkit-clip-path: inset(-1em calc(50% + 30vmin));

}

.test--clip-path-inset:nth-child(7):after {

content: "inset(-1em calc(50% + 30vmin))";

}

.test--clip-path-inset:nth-child(8) {

/* basic usage */

}

.test--clip-path-inset:nth-child(8):before {

-webkit-clip-path: inset(3em round 1em);

}

.test--clip-path-inset:nth-child(8):after {

content: "inset(3em round 1em)";

}

.test--clip-path-inset:nth-child(9) {

/* with negative insets */

}

.test--clip-path-inset:nth-child(9):before {

-webkit-clip-path: inset(-1em round 50%);

}

.test--clip-path-inset:nth-child(9):after {

content: "inset(-1em round 50%)";

}

.test--clip-path-inset:nth-child(10):before {

-webkit-clip-path: inset(2vw round calc(50% - 8px) 3em);

}

.test--clip-path-inset:nth-child(10):after {

content: "inset(2vw round calc(50% - 8px) 3em)";

}

.test--clip-path-inset:nth-child(11):before {

-webkit-clip-path: inset(0 round 50% 1.5em 0);

}

.test--clip-path-inset:nth-child(11):after {

content: "inset(0 round 50% 1.5em 0)";

}

.test--clip-path-inset:nth-child(12):before {

-webkit-clip-path: inset(0 round 50% 5em 0 8px);

}

.test--clip-path-inset:nth-child(12):after {

content: "inset(0 round 50% 5em 0 8px)";

}

.test--clip-path-inset:nth-child(13):before {

-webkit-clip-path: inset(0 2.5em round 5em/50%);

}

.test--clip-path-inset:nth-child(13):after {

content: "inset(0 2.5em round 5em/50%)";

}

.test--clip-path-inset:nth-child(14) {

/*mix them*/

}

.test--clip-path-inset:nth-child(14):before {

-webkit-clip-path: inset(20px 2em round 8em/65% 0 4vw);

}

.test--clip-path-inset:nth-child(14):after {

content: "inset(20px 2em round 8em/65% 0 4vw)";

}

css inset默认值,测试CSS3 clip-path属性的不同inset值的效果相关推荐

  1. html css动画自动旋转,不炫技,SVG+CSS3 旋转动画属性就能实现的梦幻效果

    CSS3的动画相关的基础的属性基本都涉猎过了,个人认为,其中最复杂的是d:path()路径变形动画,超过3D,而位移.轨迹.旋转.缩放.斜切什么的,相对简单一些,但作为非动画设计师而言,灵活的掌握这些 ...

  2. css做喇叭动画,使用CSS3模拟音箱(音响)声音扩展动画效果

    CSS 语言: CSSSCSS 确定 @import url(https://fonts.googleapis.com/css?family=Roboto:400,500,700,300); * { ...

  3. 不炫技,SVG+CSS3 旋转动画属性就能实现的梦幻效果

    CSS3的动画相关的基础的属性基本都涉猎过了,个人认为,其中最复杂的是d:path()路径变形动画,超过3D,而位移.轨迹.旋转.缩放.斜切什么的,相对简单一些,但作为非动画设计师而言,灵活的掌握这些 ...

  4. java set循环取值_java循环遍历类属性 get 和set值方法

    //遍历sqspb类 成员为String类型 属性为空的全部替换为"/" Field[] fields = sqspb.getClass().getDeclaredFields() ...

  5. css inset默认值,css中的inset/inset-inline/inset-block

    css中当我们设置position:absolute的时候,一般都会去设置它的left/right/bottom/top,但是最近我看到chrome上,将left/right/bottom/top信息 ...

  6. css中默认值的灰色rgb_rgb()函数以及CSS中的示例

    css中默认值的灰色rgb Introduction: 介绍: Functions and properties go hand in hand while developing a website ...

  7. C++:实现量化Nth-to-default第N个默认值测试实例

    C++:实现量化Nth-to-default第N个默认值测试实例 #include "nthtodefault.hpp" #include "utilities.hpp& ...

  8. 什css3新增的属性,CSS

    1.文本阴影属性 text-shadow:10px 10px 10px red; 注: 第一个值 : 水平方向的距离 (必须有的:支持负值) 第二个值 : 垂直方向的距离 (必须有的:支持负值) 第三 ...

  9. 将CSS CLIP属性应用在:扩展覆盖效果

    日期:2013-3-18  来源:GBin1.com  在线演示 我们想要展示如何利用CSS3 clip属性制作一种简单而整洁的扩展效果,当点击一个box元素时实现平稳过渡.这个想法是为了实现某种叠加 ...

最新文章

  1. 计算机一级考模拟试题,计算机一级MSOffice考前模拟试题「附答案」
  2. 职称计算机考试word2003真题,职称计算机考试《Word2003》历年真题回顾(4)
  3. 解决 IntelliJ IDEA 内置的 Tomcat 日志中显示的中文乱码
  4. 【算法竞赛学习】学术前沿趋势-作者信息关联
  5. 服务器水冷系统仿真,水冷漫谈(三)——水冷散热器仿真方法
  6. php 子网掩码正则,验证子网掩码正则表达式代码范例
  7. JS——阶乘的三种做法(正向逆向递归)
  8. Bash脚本和/ bin / bash ^ M:错误的解释器:没有这样的文件或目录[重复]
  9. 关于super关键字
  10. 乒乓球单循环赛_乒乓球循环赛制比赛方法
  11. Maxscript-通用事件反馈
  12. 阿里巴巴编码规范考试答案
  13. 千亿商用车车联网市场,智能车载终端企业如何抢食?
  14. 谈读《三国志》 ——开篇引述 【istrangeboy原创】
  15. 酷博社区卫生系统激活健康档案的生命活力
  16. php算法----队列
  17. linux mint软件包,在Linux Mint上安装R软件包的问题18.1
  18. 基本DOS命令---3.修改文件夹和文件属性
  19. WiFi碰碰贴开发方案
  20. 2011年国外最受欢迎的15个儿童网站

热门文章

  1. (Java篇)爬取微信公众号文章并保存为 PDF 格式
  2. iPhone12怎样隐藏应用(方法分享)
  3. 远控木马中的VIP:盗刷网购账户购买虚拟礼品卡
  4. Java调用C程序 —— JNative
  5. .net core 中使用Google的protoc
  6. 文学专业发语言学c刊,投c刊一般需要多少时间才回复
  7. 香橙派OrangePi 4 LTS开发板通过Mini PCIE连接SATA硬盘的操作方法
  8. 穿越沙漠问题(C++倒推法)
  9. HMI-52-【多媒体】音乐播放器 1
  10. 使用360加固宝命令行方式加固