🔒 Closed Patulong po css

Status
Not open for further replies.
Para ma-liitan ang underline sa CSS, maaari mong gamitin ang text-decoration property at ang border-bottom property.

Narito ang mga halimbawa ng mga CSS code na ginagamit upang ma-liitan ang underline:

Code:
/* Gamit ang text-decoration */
a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-skip-ink: none;
}

Sa code na ito, ginagamit ang text-decoration-thickness upang i-adjust ang lapad ng underline at ang text-decoration-skip-ink upang maiwasan ang pag-alis ng underline sa ilang mga browsers.

Code:
/* Gamit ang border-bottom */
a {
  border-bottom: 1px solid black;
}

Sa code na ito, ginagamit ang border-bottom upang magdagdag ng isang border sa ilalim ng teksto, na siyang magiging katulad ng underline.

Kung gusto mo naman na ma-combine ang dalawang options na ito, puwede mong gawin ito:

Code:
a {
  border-bottom: 1px solid black;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-skip-ink: none;
}

Sa code na ito, ginagamit ang border-bottom upang magdagdag ng underline sa teksto, at pag pumunta ang mouse sa teksto (:hover), magiging visible ang underline gamit ang text-decoration.
 
Status
Not open for further replies.

About this Thread

  • 1
    Replies
  • 498
    Views
  • 1
    Participants
Last reply from:
Unknown user

Trending Topics

Online now

Members online
1,111
Guests online
3,343
Total visitors
4,454

Forum statistics

Threads
2,307,618
Posts
29,180,052
Members
1,192,540
Latest member
Charlesleclerc1601
Back
Top