Third class (a tag selector css)

a: Hyperlink tags <a href="" target="" title=""> content </a> href If you do not write, click the content will refresh the page,

  1. href write address after the jump, if the jump site, written in front of protocol, <a href="https://www.baidu.com"> </a>, you can also put pictures address, click on the page is the picture .

  Without clicking a hyperlink within a label font color is blue, then click End turn purple font.

       2.target write to jump to a specific page position

     The default value is: _self jump to the current page, jump pages covering the previous page

      Other values: _blank jump to a new window, jump pages open in a new window, the original page is not affected

There is a single label in the head in the <base target = ""> overall planning of the page jump, also _self _blank two kinds of value,

  3. The anchor (a tag with another tag: # ID and          a tag and a tag: # name and, jump to the top button ),

                                    1.<a href="#eminem">my idol</a>

             <the p- the above mentioned id = "Eminem "> Time to rush help me </ p>

                                    2.<a href="#eminem"></a>    

           <a href=""   name="eminem"></a>

     4.title prompt action from the mouse put up titl The information content is displayed.

<p style = "color: blue   "> </ p> inline style makes the code bloated, is not conducive to maintenance, you can use the internal styles, the development will not use internal but external style style style exterior is built in an external then css file for reference, reference is to use the link tag (single) <link rel = "stylesheet" href = ""> in the head, the external css file without writing style, and note that write external css file header: @charset " utf-8 "; Note tail semicolon write, to prevent distortion of the internal pattern stored in the head tag of the tag inside the style, the style  selector {properties:;} decision

Written in the tag name tag attributes, {} is written in css attributes, attribute values ​​by the end;

Note embodiment css / * 123 * /,

Why css called Cascading Style Sheets, because if you declare inside the same label elements similar style, the latter will cover the front, and there is also a priority issue low priority high priority coverage.

<style>

p {color: red;} / * p * is the selector /

p {color: blue} / * * back the front cover /

</style>

<head>

  <style>

  /*

    p{

      color:red;

      background-color:black;

    }

     */

  <Link rel = "stylesheet" href = ""> // rel is the file type

  </style>      

</head>

:( named selector must "see to know the name meaning" only with reasonable English, the character does not work, should begin with a lowercase)

   1. tag selector eg: p {}

   2.id selector, the same unique id, id can not be declared,  

    #abc{

                     color:red;

                     }

 

    <p id="box"></p>

     3. Class Selector

 

 

 

  

  

Guess you like

Origin www.cnblogs.com/yzdwd/p/12079508.html