HTML&CSS入门

2023-02-21  本文已影响0人  杨志聪

可以使用Visual studio Code来编写代码。安装Prettier插件格式化代码、安装Live Server插件快速预览代码效果。

  1. 编写HTML代码时,可以使用Emmet语法,提高编写效率。

  2. CSS伪类选择器(Pseudo-class Selectors)。

article :first-child #The first child of article elements 
article :first-of-type #The first occurrence of elements of different type 
article p:first-of-type # The first p element inside article elements 
  1. CSS伪元素选择器(Pseudo-element Selectors)
p::first-letter #The first letter of every p element 
p::first-line #The first line of every p element 
::selection #Any selected element 
p::before #To insert content before the content of p elements
p::after #To insert content after the content of p elements
上一篇下一篇

猜你喜欢

热点阅读