🔒 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
  • 492
    Views
  • 1
    Participants
Last reply from:
Unknown user

Trending Topics

Online now

Members online
425
Guests online
1,336
Total visitors
1,761

Forum statistics

Threads
2,273,561
Posts
28,950,380
Members
1,235,821
Latest member
patpat0115
Back
Top