zoukankan      html  css  js  c++  java
  • ID and CLASS

    CLASS ,ID and NAME

    Class is the class that sets the label.
    ID is the label that sets the label.
    The class attribute is used to specify which style the element belongs to.
    For example, a stylesheet can be added:
    .baobao {color: lime; background: #ff80c0}
    Method of use: class= "Baobao"
    The ID attribute is used to define the unique style of an element. Such as a CSS rule:

    #binbin {font-size: larger}
    Method of use: id= "Binbin"
    

    ID is a label used to distinguish different structures and contents, just like your school number. If 2 people in a class share the same student ID, there will be confusion.
    Class is a style that can be contained in any structure and content, just like a garment.
    Conceptually, it is different: ID first finds the structure / content, and then defines the style; class first defines a style, and then sets it to multiple structures / content.
    It is summed up in one sentence: Class can be used repeatedly, while ID can only be used once in a page. It is possible that the repeated use of the same ID in most browsers will not be a problem, but on the standard this is absolutely wrong, and is likely to lead to some browsers' real problems.
    In practical applications, Class may be more useful for typesetting, and ID is more useful for placing elements in macroscopical layout and design.
    I remember a friend and I said so: ID is a school number, name is the name, class is the name of the clothes can play the same, clothes can also wear the same, but the school number is the only one.

  • 相关阅读:
    智能视频分析
    基于libuv的TCP设计(三)
    视频质量诊断----画面抖动检测
    视频质量诊断----画面冻结检测
    视频质量诊断----PTZ云台运动检测
    视频质量诊断----模糊检测
    视频质量诊断----信号丢失检测
    视频质量诊断----遮挡检测
    视频质量诊断----条纹噪声检测
    视频质量诊断----雪花噪声检测
  • 原文地址:https://www.cnblogs.com/hugeng007/p/9387190.html
Copyright © 2011-2022 走看看