專注搜索競價代運營

成長之選 ,效果之道!

免費咨詢熱線:17636682598

HTML段落標(biāo)簽間距代碼怎么設(shè)置,段落首行縮進2個空格字符代碼怎么寫

中文段落開頭都會空兩個空格,HTML代碼怎么寫讓首行縮進2個字符?段落間距怎么設(shè)置?如何對段落進行排版

段落首行縮進2個字符

  1. <!DOCTYPE html> 
  2. <html> 
  3.     <head> 
  4.         <meta charset="utf-8"
  5.         <title>通高科技</title> 
  6.         <style> 
  7.             p{ 
  8.                 width: 150px; 
  9.                 background-color: aqua; 
  10.                 font-size: 15px; 
  11.                 float: left; 
  12.                 margin: 0 15px; 
  13.                 font-size: 16px;; 
  14.             } 
  15.             .p1{ 
  16.                 line-height: 30px; 
  17.                 text-indent: 32px;/* 字體大小*2 */ 
  18.             } 
  19.         </style> 
  20.     </head> 
  21.     <body> 
  22.         <p>段落首行縮進:未縮進</p> 
  23.         <p class="p1">段落首行縮進:縮進2個字符</p> 
  24.     </body> 
  25. </html> 

段落間距設(shè)置

段落間距設(shè)置:行與行間距、字體與字體之間間距

  1. <!DOCTYPE html> 
  2. <html> 
  3.     <head> 
  4.         <meta charset="utf-8"
  5.         <title>通高科技</title> 
  6.         <style> 
  7.             p{ 
  8.                 width: 150px; 
  9.                 background-color: aqua; 
  10.                 font-size: 15px; 
  11.                 float: left; 
  12.                 margin: 0 15px; 
  13.             } 
  14.             .p1{ 
  15.                 line-height: 30px; 
  16.             } 
  17.             .p2{ 
  18.                 letter-spacing:10px 
  19.             } 
  20.         </style> 
  21.     </head> 
  22.     <body> 
  23.         <p>段落行間距設(shè)置:這是一個段落</p> 
  24.         <p class="p1">段落行間距設(shè)置:字號16PX,行高20PX</p> 
  25.         <p class="p1 p2">段落字體間距設(shè)置:字體與字體之間的距離</p> 
  26.     </body> 
  27. </html> 

本文分類:營銷學(xué)院

瀏覽次數(shù):93次瀏覽

發(fā)布日期:2022-07-09 15:14:23

本文鏈接:http://www.ozone-depletion.net/edu/2426.html