伪类(before和after在这里)_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:43:06
Original
1415 people have browsed it

一、before和after伪类

  • before  在之前插入样式
  •  

    结果演示

     

  • after  在之后插入样式
  • 结果是

     

    二、root伪类

    设置最底层的样式,可用于插入背景图片

    三、

  • input:enabled{......}      设置所有已启用的input元素
  • input:disabled{......}     设置并且禁止对应的input元素
  •  

    四、css:: selection   如:p:: selection{.......}

    伪类选择器用于突出显示的页面用户选择的任何部分,包括可编辑文本字段中的文本

     

    五、反伪类选择器

  • E:not(s)  匹配不符合当前选择器的任何元素
  •  

    六、target伪类

    用于匹配连接到同一页面的某个位置中

    上面结果第点击对应的a连接则会自动跳转到对应的div并改变其样式

    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!