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

Trending Topics

Online now

Members online
366
Guests online
832
Total visitors
1,198

Forum statistics

Threads
2,284,361
Posts
29,022,736
Members
1,220,926
Latest member
Kinozz
Back
Top