Tag attributes and attribute values

1. list-style-type is the content that sets the list item mark

The values ​​learned so far are: none: no mark, you can mark ul and li


<style>
     li{ 
         list-style-type:none;
        }
<style/>

<body>
    <ul>
       <li>...<li/>
    <ul/>
<body/>

2. text-decoration: none: remove the underline

There are four values: none, underline, overline, line-through

text-decoration: underline: underline the bottom of the text

text-decoration: overline: add an underline to the top of the text

text-decoration: line-through: pass through the middle of the text

<style>
    .box1 a{text-decoration:none;}

    .box2 a{text-decoration:underline;}

    .box3 a{text-decoration:overline;}

    .box4 a{text-decoration:line-through;}
<style/>
<body>
   <div class="box1">
      <a herf=" "target="">去掉下划线<a/>
   <div/>

 <div class="box2">
      <a herf=" "target="">下划线<a/>
   <div/>

 <div class="box3">
      <a herf=" "target="">上划线<a/>
   <div/>

 <div class="box4">
      <a herf=" "target="">从文字中间穿过的线<a/>
   <div/>

<body/>

3.align-items:center:: Position the element in the center of the container.

div{
    display:flex;
     alingn-items:center
    }

4. display: flex: elastic layout that can expand and contract.

justify-content: Alignment on the main axis

space-between;Align both ends with equal spacing in the middle.

div{
    display:flex;
    justify-content:space-between}



<div class="box1">
  <div><div/>
  <div><div/>
  <div><div/>
<div/>

5.display: inline-block;

display:inline; Inline elements are simply displayed on the same line.
display:block; Block-level elements, simply put, have line breaks and will be changed to the second line.
display:inline-block; is a block-level element in the same line.
 

6. no-repeat, used to set the background image so that it does not repeat

7. vertical-align, can be used to set the vertical alignment of elements

   Several attribute values ​​​​that I have come across so far: 

          1. baseline: default. The element is placed on the parent element's baseline.
          2.sub: Vertically align the subscript of the text.
          3. super: Vertically align the superscript of the text
          4. middle: Place the element in the middle of the parent element.

8. text-align: center; is to arrange the text in the element to the middle.

Guess you like

Origin blog.csdn.net/weixin_71452134/article/details/128194986