Home > Web Front-end > HTML Tutorial > CSS writing, basic syntax issues_html/css_WEB-ITnose

CSS writing, basic syntax issues_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:02:30
Original
1066 people have browsed it

If there is such a code


  • 11111
    ;1

  •                                                 gt;
    < ;/div>

    CSS is as follows
    #abc
    {
    alignment-adjust:auto;
    ruby-align:left;
    }
    What is my problem? Can you write CSS for
  • and
      in
      in #abc so that it is easier to manage the code
      such as
      #abc
      {
      alignment- adjust:auto;
      ruby-align:left;
      .li.............
      .ul.......... .... This type of
      }




      Reply to discussion (solution)

      can be written like this:
      #abc .li{

      ....

      }

      #abc.ul{
      ....
      }

      You cannot write it like the original poster.

      can be written like this:

      #abc .li{

      ....

      }

      #abc .li .ul{
      ....
      }
      #abc.ul{
      ....
      }
      Both are fine

      My friend, in fact, it is not easy to manage code the way you think.
      For example, what you said:
      #abc

      {

      alignment-adjust:auto;
      ruby-align:left;
      .li.......... ........
      .ul............. This kind of
      }
      If there are too many levels of nesting, it will be very troublesome.
      In addition, to correct your question, li and ul are html tags, and there is no need to add "." in front of them. "." represents class
      In contrast,
      #abc li{
      }
      #abc ul{
      }
      This will make it much clearer and easier for you to see the hierarchical relationship

  • Related labels:
    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