
CSS
YUHUI01
总有刁民想害朕
展开
-
CSS——隐藏滚动条
隐藏scroll-view滚动条/deep/ ::-webkit-scrollbar{ display: none!important; width: 0!important; height: 0!important; background-color: transparent!important;}原创 2020-10-23 16:10:15 · 307 阅读 · 0 评论 -
CSS——不确定长度的文本两端对齐
<!DOCTYPE html><html lang="zh"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>domo</title> <style> div { wid.原创 2020-08-31 18:19:24 · 664 阅读 · 0 评论 -
css——常见的伪元素
<!DOCTYPE html><head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no" /> <style> /* 创...原创 2019-11-01 09:37:07 · 943 阅读 · 0 评论 -
CSS——图标形状绘制
1、小箭头#curvedarrow { position: relative; width: 0; height: 0; border-top: 9px solid transparent; border-right: 9px solid red; transform: rotate(10deg);}#curvedarrow:after { content...转载 2019-06-11 09:03:49 · 545 阅读 · 0 评论 -
CSS3——重置样式表
使用sandal的重置样式表,方便以后使用html { -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; height: 100%; } body { margin: 0; f...原创 2019-04-07 14:24:35 · 6545 阅读 · 0 评论 -
CSS——常见的css布局
1、单列布局主要使用max-width属性样式实现,使用max-width是为了当屏幕小于2000px时不出现滚动条<div class="header"></div><div class="content"></div><div class="footer"></div&g原创 2019-01-01 16:53:30 · 359 阅读 · 0 评论 -
CSS——浏览器兼容问题
大神的总结大神总结1、使用flex布局,容器高度丢失,父容器使用 overflow: auto; 可找回高度#app .screen{ width: 100vw; height: 100vh; background-color: #fff; display: flex; flex-direction: column; //关键代码}.screen .conte...原创 2019-01-03 20:31:06 · 448 阅读 · 0 评论 -
CSS——有趣的样式属性(文本截断)
文本截断 test-overflow 当文本溢出,使用 test-overflow:ellipsis;可以实现文本截断,浏览器兼容性好,但是只支持单行文本截断div{ white-space: nowrap;/*设置文本不换行*/ overflow: hidden; /*设置容器超出隐藏*/ text-overflow: ellipsis;/*设置单行文本...原创 2018-12-02 14:32:37 · 1004 阅读 · 0 评论 -
CSS——flex弹性布局
创建表单,加入常用的表单控件<form> <input type="email" name='email'> <button type="submit">提交</button></form>两个空间都是行内快元素,默认会排列在一行,浏览器在渲染的时候会带有默认的间隔,使用flex布局可以清除控件之间的间隔...原创 2018-12-02 12:29:22 · 366 阅读 · 0 评论 -
CSS——总结、小技巧
1、在使用绝对定位时,同时设置left、right为0,margin为auto,可以做到水平居中,同时设置top、bottom为0,margin为auto,可以设置垂直居中2、实现垂直居中,可以利用 transform 属性.canvas-box{ position: absolute; text-align: center; line-height: 48rpx; to...原创 2018-11-21 22:43:13 · 247 阅读 · 0 评论