04 2021 档案

v-show 中使用三元表达式
摘要:v-show="active == index ? true : false " **ture和false 不能带引号 阅读全文

posted @ 2021-04-15 10:56 cropsecrab 阅读(1484) 评论(0) 推荐(0)

vue 3.0中使用router push跳转
摘要:在setup中使用 <script> import { useRouter } from 'vue-router'; export default { setup(){ const router = useRouter(); function myFn(){ router.push('/total' 阅读全文

posted @ 2021-04-13 16:53 cropsecrab 阅读(3970) 评论(0) 推荐(0)

vue3
摘要:vue3的六大亮点: 1、性能比vue2快 优化了diff算法:vue2中是创建虚拟dom树然后全部比较,vue3新增了动态标记,为改变的值增加flag标记,与上次虚拟节点进行比较的时候,只会比较有flag标记的节点 阅读全文

posted @ 2021-04-02 16:31 cropsecrab 阅读(82) 评论(0) 推荐(0)

BFC
摘要:BFC: 块级格式化上下文,是一种属性,display属性为block, list-item ,table的元素,会产生BFC。 如何产生bfc: 1)根元素2)float属性不为none3)position不为static和relative4)overflow不为visible5)display为 阅读全文

posted @ 2021-04-01 17:23 cropsecrab 阅读(87) 评论(0) 推荐(0)

css 4种方式 样式导入 import + link
摘要:一、内联样式 style=" " 二、内嵌式 head 里面 <style>...</style> 三、import **先加载 html ,再加载 css 会导致先显示出网页结构再闪烁一下加载出网页样式 <style> @import url( ); </style> 四、link **先加载 c 阅读全文

posted @ 2021-04-01 16:24 cropsecrab 阅读(353) 评论(0) 推荐(0)

css 选择器种类 10种 + 权重
摘要:1、类选择器 .class名{ } 2、id选择器 #id名{ } 3、元素选择器 元素名{ } eg:p{} h1{} div{} 4、属性选择器 选择器名[ 属性名 ]{ } eg:a[href] { color: red } 带有 href 属性的a标签颜色设置为红色 5、伪类选择器 eg:d 阅读全文

posted @ 2021-04-01 15:34 cropsecrab 阅读(363) 评论(0) 推荐(0)

计量单位 px em rem 联系与区别
摘要:px: 绝对尺寸,像素 缺点是不适应浏览器大小变化,所以一般不用于响应式网站 em: 相对尺寸,相对于当前对象内文本的 font-size (如果当前对象内文本的 font-size 计量单位也为em,则当前对象内文本的 font-size 为父元素文本的 font-size) 可以较好的适应屏幕变 阅读全文

posted @ 2021-04-01 13:35 cropsecrab 阅读(256) 评论(0) 推荐(0)

bootstrap 栅格布局
摘要:<div class="container"> // .container-fluid 表示100%宽度 <div class="row"> <div class="col-sm"> // .col- .col-sm- .col-md- .col-lg- .col-xl- One of three 阅读全文

posted @ 2021-04-01 10:02 cropsecrab 阅读(49) 评论(0) 推荐(0)

导航