
css
輕描淡寫以後的以後
这个作者很懒,什么都没留下…
展开
-
20 个 CSS 高级技巧汇总
使用技巧会让人变的越来越懒,没错,我就是想让你变懒。下面是我收集的CSS高级技巧,希望你懒出境界。1、黑白图像这段代码会让你的彩色照片显示为黑白照片,是不是很酷?img.desaturate { filter: grayscale(100%); -webkit-filter: grayscale(100%); -moz-filter: grayscale(100%); -ms-filter: grayscale(100%); -o-filter: grayscal转载 2021-08-30 09:41:53 · 149 阅读 · 0 评论 -
你能描述一下渐进增强和优雅降级之间的不同吗?(面试题目)
第一眼看到这个题目,这两个名词都不熟悉,回头查了相关资料,看了下,实际自己之前用过,但是不知道原来有这么两个好听的名字。先看两个例子:.transition{ -webkit-transition: all .5s; -moz-transition: all .5s; -o-transition: all .5s; transition: all .5s; }.transition{ transition: all .5s;.转载 2020-10-29 10:21:21 · 291 阅读 · 0 评论 -
css禁止事件
<div id="mapbox"></div>#mapbox{ pointer-events:none; }原创 2020-08-27 17:28:48 · 225 阅读 · 0 评论 -
animate.css修改动画执行时间
只需要在animate.css的开头找到.animated{ }进行修改即可:.animated { -webkit-animation-duration: 1s; animation-duration: 2s; // 动画执行时间 -webkit-animation-fill-mode: both; animation-fill-mode: both;}但其实有更好的方法,只需在要执行动画的div设置stye:<div style="animati转载 2020-08-20 11:15:57 · 4747 阅读 · 0 评论 -
css 吸顶效果 position:sticky
nav{ position: -webkit-sticky; // 兼容 position:sticky; top:0px; } 注意top、bottom 的生效距离由最近一个overflow属性是hidden scroll auto或 overlay 的祖先元素决定。 父元素为overflow:hidden时,由于容器内无法滚动,所以实际上也无法生效。 必须指定top、bottom、left、right4个值之一,否则只会处于相对定位。 父元素的高度不能低于s...原创 2020-07-01 10:01:38 · 991 阅读 · 0 评论 -
css3实现三角形(上下左右)
实现三角形的绘制很简单。第一步:新建一个div。<div class="kailong"></div>第二步:为盒子添加样式。1.向上.kailong{ width:0; height:0; border-right:50px solid transparent; border-left:50px solid transparent; border-bottom:50px solid red;}2.向下.k...转载 2020-06-09 16:26:57 · 1266 阅读 · 0 评论