sumber : How to Change Fonts in WordPress: Complete & Easy Guide (hostinger.co.id)
How to change fonts in WordPress using CSS requires you to write a few lines of code. You can do this through the editor or Customiser. However, it is best to use a customiser because it will be easier.
- Log in to the WordPress dashboard, then select Appearance > Customise.
- Choose Additional CSS
You can add a line of code to the box on the left.
- To replace the entire font:
body {font-size: 1.25m;}
- To change the paragraph font:
p {font-size: 25px;}
- To replace a specific heading font
h2 {font-size: 2.5em;}
- To modify the sidebar font size:
.sidebar li {font-size: 12px;}
- To customize the footer font:
.footer {font-size: 150%;}
- To change the font size on a specific screen:
html {font-size: 18px;}@media (min-width: 900px) {html {font-size: 20px;}}
Customize css styles using four units to set the font size of the text:
- Em (em). Used on web media documents. 1 em equals 12 points.
- Pixels (px). Used on display media. 1 px equals 1 dot on a computer screen.
- Point (pt). Units for traditional print media. 1 point equals to 1/72 inch.
- Percent (%). The default is 100%, which will change after zooming in or out.
Komentar Terbaru