上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页
摘要: Refs 提供了一种方式,允许我们访问 DOM 节点 或 在 render 方法中创建的 React 元素(组件)。 Refs主要提供了三种方式: import React, { Component } from 'react' import { Input } from 'antd'; impor 阅读全文
posted @ 2021-06-28 15:18 Action_swt 阅读(61) 评论(0) 推荐(0) 编辑
摘要: //在js中可以使用{...p}来复制一个对象,但是这个地方并不是复制对象,而是babel+react通过展开运算符,展开了一个对象 //但是只能在标签中进行使用 //const p = {name:"swt",age:"18",sex:"男"} {14}就代表的是数值 //ReactDOM.ren 阅读全文
posted @ 2021-06-28 14:33 Action_swt 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 在react中,想要改变state内部状态,需要使用setState进行修改,如果只是修改state的部分属性,则不会影响其他的属性,这个只是合并并不是覆盖。 this.setState(),该方法接收两种参数:对象或函数(理解对象形式是函数形式的简写)。 对象:this.setState({key 阅读全文
posted @ 2021-06-28 13:49 Action_swt 阅读(107) 评论(0) 推荐(0) 编辑
摘要: box-shadow: inset 0 0 0px 0px, 0 0 5px 2000px rgb(0 0 0 / 50%); 阅读全文
posted @ 2021-06-24 13:46 Action_swt 阅读(44) 评论(0) 推荐(0) 编辑
摘要: lazy-load三个版本: JQuery版本: jquery_lazyload Vue版本: vue-lazyloadvue-lazyload原理解析 React版本: react-lazyload 阅读全文
posted @ 2021-06-17 23:49 Action_swt 阅读(206) 评论(0) 推荐(0) 编辑
摘要: <p class="coupon"> <span>10000</span>SWT优惠券 </p> .coupon { width: 300px; height: 100px; line-height: 100px; margin: 50px auto; text-align: center; pos 阅读全文
posted @ 2021-06-07 16:22 Action_swt 阅读(275) 评论(0) 推荐(0) 编辑
摘要: /* 正三角 */ .up-triangle { width: 0; height: 0; border-style: solid; border-width: 0 25px 40px 25px; border-color: transparent transparent rgb(245, 129, 阅读全文
posted @ 2021-06-07 16:14 Action_swt 阅读(45) 评论(0) 推荐(0) 编辑
摘要: <p class="scroll-container"> 文字是人类用符号记录表达信息以传之久远的方式和工具。现代文字大多是记录语言的工具。人类往往先有口头的语言后产生书面文字,很多小语种,有语言但没有文字。文字的不同体现了国家和民族的书面表达的方式和思维不同。文字使人类进入有历史记录的文明社会。 阅读全文
posted @ 2021-06-07 16:10 Action_swt 阅读(138) 评论(0) 推荐(0) 编辑
摘要: <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> </ul> ul{ width: 500px; margin:auto; list-style: none; padding:0; border:1px so 阅读全文
posted @ 2021-06-07 15:51 Action_swt 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 特点: 绝对定位和固定定位时,同时设置 left 和 right 等同于隐式地设置宽度 span{ border:1px solid red; position: absolute; left:0; right:0; /* 等同于设置 width:100%;display:block */ } <s 阅读全文
posted @ 2021-06-07 15:45 Action_swt 阅读(66) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 18 下一页