第二天

2018-10-16  本文已影响0人  冥千洛

今日学习:选择器,元素选择器:标签名{},类选择器:classname{},id选择器#ID{},复合选择器:-选择器1选择器2{},群组选择器:选择器1,选择器2,选择器3{},通用选择器:*{},后代选择器:祖先元素 后代元素 后代元素{}
标签间的关系:祖先元素,后代元素,夫元素,子元素,兄弟元素
给链接定义样式
正常链接: -a:link
访问过的链接 -a:visited(只能定义字体颜色)
鼠标滑过的链接:-a:hover
正在点击的链接: -a:active
获取焦点: -:focus
指定元素前 :-:before
指定元素后 : -:after
选中的元素: 1::selection
给段落定义样式
首字母 -:first-letter
首行: -:first-line


image.png
image.png

作业:

1.plate image.png
  1. bento


    image.png

    3.fancy


    image.png
    4.plate apple
    image.png
    5.#fancy pickle image.png
    6.apple.small
    image.png
    7.orange.small
    image.png
    8.bento orange.small
    image.png
    9.plate , bento

    10.*


    image.png
    11.plate *
    image.png
    12.plate + apple
    image.png
    13.bento ~ pickle
    image.png
  2. plate > apple


    image.png

    15.plate orange:first-child


    image.png
    16.plate *:only-child
    image.png

    17.#fancy *:last-child , plate + pickle


    image.png
    18.plate:nth-child(3)
    image.png
    19.bento:nth-last-child(4)
    image.png
    20.apple:first-of-type
    image.png
    21.plate:nth-of-type(2n)
    image.png

    22.plate:nth-of-type(2n+3)


    image.png
    23.plate apple.small:only-of-type
    image.png
  3. orange:last-of-type , apple:last-of-type


    image.png

    25.bento:empty


    image.png
    26.apple:not(.small) image.png
上一篇下一篇

猜你喜欢

热点阅读