text-decoration 實現橫線從文字中間穿過的CSS效果屬性和html標籤__html

來源:互聯網
上載者:User

如何在html頁面中實現橫線從文字中間穿過的效果呢。

要實現這種效果有三種方法可實現,如下:

1、是用CSS樣式表中 text-decoration:line-through; 屬性

2、是使用<del>186.00</del>html標籤

3、是使用<s>186.00</s>html標籤 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>MJ.588cy.com</title> <style type="text/css"> b{ text-decoration: line-through; font-weight:100;} </style> </head> <body> <b>186.00</b> <del>186.00</del> <s>186.00</s> </body> </html>

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.