css
water_Popcorn
这个作者很懒,什么都没留下…
展开
-
CSS 解决火狐浏览器打印时,背景颜色丢失的问题
问题描述:react-to-print 打印指定div时,在谷歌和edge可以正常打印,在火狐打印时,打印部分的背景颜色丢失。解决:在打印的div中加样式:{ print-color-adjust: exact; color-adjust: exact;}原创 2022-05-13 09:28:52 · 572 阅读 · 0 评论 -
css 不同浏览器隐藏滚动轴仍可滚动
火狐(firefox).class{scrollbar-width: none;}IE10+.class{-ms-overflow-style: none;}谷歌(Chrome)&& safari.class::-webkit-scrollbar { display: none; }原创 2022-02-24 14:19:19 · 145 阅读 · 0 评论 -
CSS 图片淡入淡出效果
html源码: css源码:.fadeImg {width: 100px;height: 100px;background: red;-webkit-animation: fadeinout 5s linear forwards;animation: fadeinout 5s linear forwards;}@-webkit-keyframes fadeinout {0%{ opacity: 1; }50% { opacity: 0.5; }100% { opacity: 0;原创 2021-04-25 11:49:06 · 2629 阅读 · 0 评论 -
css 设置隐藏滚动轴仍然可以滚动
css源码:.className{height:400px;overflow-x:hidden;overflow-y:scroll;}.className::-webkit-scrollbar{display:none;}原创 2020-05-22 14:06:39 · 345 阅读 · 0 评论 -
css 父标签宽度自适应内容(兼容ie)
此样式兼容ie.class父{height: 30px;width: -moz-fit-content;width: -webkit-fit-content;width: fit-content;overflow: hidden;margin:0 auto;}.class子 {width: auto;overflow: hidden;display...原创 2019-07-31 14:27:19 · 3792 阅读 · 1 评论 -
css div随浏览器变动仍居中显示
css源码:.class1{position:absolute;width: 500px;height: 400px;top:50%;left:50%;/*显示开始位置是屏幕的中心点*/margin-top:-200px; /*通过将上边距,向上调整负值,让DIV纵向居中。负值的绝对值应当是height的1/2*/margin-left:-250px;/*通过将左边距,...原创 2019-07-29 09:47:20 · 353 阅读 · 0 评论 -
css ul的宽度根据li的总宽度自适应变化且剧中
css源码:ul{ width: -moz-fit-content; width: -webkit-fit-content; width: fit-content; margin: auto;}li{float:left}原创 2019-06-27 16:35:46 · 4794 阅读 · 5 评论 -
css input框或者button点击的时候外面一层框框去除掉
css源码:input:focus,input:active:focus,input.active:focus,input.focus,input:active.focus,input.active.focus {outline: none;border-color: transparent;box-shadow: none;}button按钮同理...原创 2019-05-23 14:53:19 · 804 阅读 · 0 评论 -
css font-family字体总结表
windows常见内置中文字体字体中文名字体英文名字体应用宋体SimSun(浏览器默认)中文名 英文名 浏览器默认黑体SimHei中文名 英文名 浏览器默认微软雅黑Microsoft Yahei转载 2018-04-04 13:09:17 · 561 阅读 · 0 评论 -
css 两个div叠加放置
css:.bigDiv{ position: relative;}.smallDiv1{ position: absolute; width: 200px; height: 200px; background-color: pink; z-index: 2;}.smallDiv2{ position: absolute;原创 2018-01-11 14:02:26 · 7698 阅读 · 0 评论 -
什么是文档标准流
文档标准流:1、 空白折叠现象:标签之间没有间隙,必须紧密相连编写,就没有空隙啦2、 高矮不齐,底边对齐:3、 自动换行,一行写不满,换行4、 块级元素和行内元素:行内元素特性:行内元素可以与其他行内元素并排,在一排上面显示 不能设置宽和高,默认高度是文字的高和宽。块级元素特性:独占一行,不与其他任何元素并列 可接原创 2017-12-21 17:19:33 · 1106 阅读 · 0 评论 -
css3 实现正方体3D旋转
源代码如下:html lang="en">head> meta charset="UTF-8"> title>Titletitle> style> .all{ margin-left: 200px; width: 300px; height: 300px;原创 2017-11-29 10:40:04 · 702 阅读 · 0 评论 -
css3新增选择器
1. 属性选择器:1) E[att] 元素[属性]:选择具有att属性的E元素,需要选择有某个属性的元素, 而不论是行为是什么,可以使用简单的属性选择器注:可以根据多个属性进行选择,只需要将属性选择器连接即可。2) E[att=val] 元素[属性=属性值]: 选择具有att属性且属性值为val的E元素,进一步缩小范围3)原创 2017-11-09 17:24:25 · 471 阅读 · 0 评论 -
css 圆形的按钮设计
Html源代码:button class="all_list_brands_title_details_btn" id="brands_button" > span class="glyphicon">∨span>button>css源代码:.all_list_brands_title_details_btn{ width: 30px; height: 30p原创 2017-10-09 19:01:00 · 13924 阅读 · 4 评论