- Jun 2020
-
www.educative.io www.educative.io
-
You can style the input with the type attribute differenly, like so:
可以通过这种方式选定特定类型 iniput 元素而不用加类名
-
Content added using pseudo-elements is only visually displayed. It is not inserted into the DOM. Don’t rely on :before and :after to insert content that is relevant to the meaning and completeness of the content on the page.
伪类插入的元素仅仅应用于显示,并不插入 dom
-
On the contrary the same could have been achieved by using the :first-letter pseudo-element selector.
:first-letter 是个伪类
-
-
www.midifan.com www.midifan.com
Tags
Annotators
URL
-
-
-
Note that when you use &::before with content, you need to add quotes to the value of content, otherwise the text does not get applied correctly.
&:hover{ background-color: ${props => lighten(0.7,themesMap.get(props.theme)!.secondaryColor)}; } &:before{ content: 'before'; }
-
-
www.educative.io www.educative.io
-
The CSS above will ONLY select the h1 and h2 within the div. The other h1 and h2 within the p tag will be left unstyled.
父级选择器用空格
-
If you remember, flex: 1 0 0 says, “grow the container to fit the entire available space, keep the initial width at zero, and don’t shrink the item too”
让中间部分撑满,自然让顶部和底部 fixed
-
Remember, the default value for flex-direction is row.
默认 flex-direction 是 row
-
Technically, line 2 says, “make sure the minimum height (min-height) of the body element is 100% of the viewport height (vh)”
让 body 最小高度是100vh
-
descendant selector - which is based on parent and child relationship.
父子选择器,用空格
-
/* ... */
css注释:color: red; /Should this be Red or Green? - another comment!/
-
-
react-hooks-cheatsheet.com react-hooks-cheatsheet.com
-
useCallback returns a memoized callback.
useCallbak 可以直接看成回调函数,只是他是 memoized 过的
Tags
Annotators
URL
-
-
www.educative.io www.educative.io
-
Here is what you should have:
list-style: none; 放在 ul 里面,改变 li 的样式
-
-
github.com github.com
-
const httpLink = new HttpLink({ uri: 'https://instagram-clone-3.herokuapp.com/v1/graphql' }); const authLink = setContext((_, { headers }) => { const token = accessToken; if (token) { return { headers: { ...headers, authorization: `Bearer ${token}` } }; } else { return { headers: { ...headers } }; } }); const client = new ApolloClient({ link: authLink.concat(httpLink), cache: new InMemoryCache() });
concat two link
-
-
www.runoob.com www.runoob.com
-
fn another_function(x: i32, y: i32) { println!("x 的值为 : {}", x); println!("y 的值为 : {}", y); }
参数类型冒号定义在后面,i32代表整数
-
-
stackoverflow.com stackoverflow.com
-
This issue comes from the axios library. In order to fix that, you have to pull out the data property: return this.httpService.post(...) .pipe( map(response => response.data), );
这是 nest.js 常见错误,获取数据后需要做 map 处理
-
-
-
if the first child in an element has a margin-top,that can merge with the parent's margin-top.所以解决方法就是给 parent 加 padding,只要不 touch 第一个 子元素就不会有这个问题
-
-
-
盒模型的默认 margin-top 和 margin-bottom 等于其font-size
-
- May 2020
-
scrimba.com scrimba.com
-
Good morning! em标签用于斜体
-
<!DOCTYPE html>
Tags
Annotators
URL
-
-
globalnews.ca globalnews.ca
-
Ujiri said “police have a tough job. But … they are supposed to protect all of us.
Ujiri说:"警察的工作很辛苦。但是...........他们应该保护我们所有人。
-
A death like this happens, and we rage about it, and the headlines recede, and the world moves on, and then a few weeks later something else happens and we’re outraged again and then we move on, again. We have to stop that cycle,” Ujiri said in the column.
像这样的死亡事件发生后,我们对它感到愤怒,头条新闻退去,世界继续前进,然后几周后又有其他事情发生,我们再次感到愤怒,然后我们又继续前进。我们必须停止这种循环,"Ujiri在专栏中说。
-
Ujiri, in column that was published Sunday by the Globe and Mail, wrote about his reaction to seeing the video of Floyd, a 46-year-old black man, dying after a Minneapolis police officer pressed his knee into his neck for several minutes, even after he stopped moving and pleading for air last Monday.
Ujiri在《环球邮报》周日发表的专栏中写道,他在看到明尼阿波利斯一名46岁的黑人男子弗洛伊德的视频后,即使在上周一停止了行动并恳求空气后,他的反应是,他的膝盖被一名明尼阿波利斯警察按在脖子上几分钟后就死了。
-
-
www.educative.io www.educative.io
-
const Hello: React.FC<Props> = ({ who }) => ( <p>Hello, {who}</p>);
最简单的 FC props定义方式
-
-
-
还要指出的另一点是,长度和大小都可以从其形状中获得:length实际上是第一维的长度,因此等于shape[0],而size是元素的总数,等于元素中所有元素的乘积形元组。
-
-
hyperskill.org hyperskill.org
-
通常,Arrays用于两种数据结构:queue和stack。 要了解什么queue是食品,您可以想象在食品商店中有一个普通的队列:新人们在队列的末端加入队列,而刚开始的人们则先离开队列。这就是为什么我们需要两种方法来实现的原因queue:一种在的末尾添加元素,Array而另一种在的开始处删除元素的方法queue。这两种方法是push()将一个或多个元素添加到数组的末尾并返回新的数组长度,并shift()删除数组的第零个元素并返回其值:
-
The slice() method works only with arrays whose elements are strings, numbers, or boolean values.
只有字符串,数字,布尔值三种类型的数组可以用 slice 操作
-
Indexes can also be negative. If you specify a negative index in the first parameter, it will shift the end of the sequence. For example, slice(-4) call will extract the last four elements of the sequence:
index 可以是复数,arr.slice(-4)代表从倒数第四个值到最后
-
The slice() method does not change the source array, but returns a copy of the array
slice()方法是个纯函数
-