CSS
有条有条
这个作者很懒,什么都没留下…
展开
-
解决 flex 布局导致 svg 缩放
【代码】解决 flex 布局导致 svg 缩放。原创 2023-02-15 11:41:56 · 301 阅读 · 0 评论 -
fixed布局中,margin属性失效的解决方法
fixed布局中,margin属性失效的解决方法使用padding属性即可原创 2020-02-25 10:31:17 · 1581 阅读 · 0 评论 -
CSS组件置顶/置底/透明/堆叠
CSS组件置顶/置底/透明置顶:position:fixed;top:0;置底:position: fixed;bottom: 0;透明:opacity: 0.5; // 取值0-1,0未为完全透明,1为不透明元素的堆叠:z-index: 999; // 值越大,在越上层...原创 2020-02-21 16:29:01 · 4567 阅读 · 0 评论 -
CSS绝对定位,相对定位
CSS绝对定位,相对定位1、在绝对定位上显示内容(在要显示的内容上面设置相对定位)<image class="back" src="../../../../1.png"></image><view class="name">我是相对定位</view>page{ background-image: linear-gradient(#94c...原创 2020-02-17 16:06:50 · 121 阅读 · 0 评论 -
CSS距离父元素底部距离
CSS距离父元素底部距离margin-bottom: 35rpx;原创 2020-02-13 17:04:21 · 7170 阅读 · 0 评论 -
CSS吸低
CSS吸低// 两个属性搭配使用,缺一不可position: fixed;bottom: 0;原创 2020-02-05 15:18:08 · 481 阅读 · 0 评论 -
CSS文本的缩进
CSS文本的缩进<div class="text-indent_7"> <span>...</span> <span>...</span></div>.text-indent_7 { text-indent: -7rem; margin-left: 7rem;}效果图:...原创 2020-01-09 15:52:36 · 475 阅读 · 0 评论 -
CSS的before属性的用法
CSS的before属性的用法上两个例子来解释before属性如何使用:1、在元素前添加文本p:before{content:"台词:";}2、在元素前添加形状p:before{content:''; // 必须display: inline-block; // 必须width:1cm;height:1cm;background-color:yellow;c...原创 2020-01-09 15:13:50 · 2442 阅读 · 0 评论 -
CSS的各种居中
CSS的各种居中1、div的水平居中使用margin设置水平居中时,和配合宽度,否则无效.margin_center { margin: 0 auto; width: 250px; height: auto;}原创 2020-01-08 19:28:21 · 179 阅读 · 0 评论 -
CSS的占位隐藏和不占位隐藏
CSS的占位隐藏和不占位隐藏不占位隐藏display:none;占位隐藏visibility:hidden;原创 2020-01-08 19:01:39 · 583 阅读 · 0 评论 -
CSS对齐弹性布局中左右对齐
CSS对齐弹性布局中左右对齐<view class='li'> <view>产品名称</view> <view>猪肉</view></view>.li { display: flex; /* 在弹性盒对象的 <div> 元素中的各项周围留有空白 */ justify-content: s...原创 2019-12-24 17:53:03 · 5399 阅读 · 0 评论 -
CSS长度单位尺寸
CSS长度单位vh :相对于视口的高度。视口被均分为100单位的vh原创 2019-12-10 11:55:00 · 131 阅读 · 0 评论 -
CSS边框样式
CSS边框样式圆角边框:border-top-left-radius: 40px; // 左上角border-bottom-left-radius:40px; // 左下角border-top-right-radius: 20px; // 右上角border-bottom-right-radius: 10px; //右下角...原创 2019-12-09 09:28:46 · 142 阅读 · 0 评论 -
CSS背景颜色渐变
CSS背景颜色渐变灰色渐变:background: -webkit-linear-gradient(left, rgba(165, 159, 159, 0.8), rgba(165, 159, 159, 0.2));原创 2019-11-20 14:50:59 · 240 阅读 · 0 评论 -
uni-app class与style绑定
uni-app class与style绑定绑定多个class语法:法一:<view class="class1" :class="[ num > 10 ? class2 : ' ' , class3 ]"></view>data() { class2 : "view_class2", class3 : "view_class3", num : 0}...原创 2019-11-04 16:47:05 · 672 阅读 · 0 评论 -
CSS 点击绑定样式
CSS 点击绑定样式<view style="text-align: center;display: inline;" v-for="(tag,tagNum) in tagList" :key="tagNum"> <text class="tag" :class="{tagActive : tagNum == num}" @click="tag(tagNum)">{{t...原创 2019-11-01 14:26:01 · 403 阅读 · 0 评论 -
CSS flex 布局里面的靠右对齐
使用 flex 布局后,利用下面样式靠右显示:justify-content: flex-end;无效的原因是,在设置靠右对齐时,一定要设置左边对齐为自动:margin-left: auto;原创 2019-10-30 10:33:34 · 37447 阅读 · 4 评论