|
|
A PHP + CSS script (javascript-free) that dynamically replaces html text using any custom font. All styles go in the CSS file!
Installation
- At the very beginning of the file insert: <?php include 'dtr/dtr.php'; ?>, and at the end: <?php ob_end_flush(); ?>
- Link the stylesheet: <link href="dtr/headings.css" rel="stylesheet" type="text/css" />
- Copy your font files (.ttf or .otf) to the DTR folder and start styling!
Usage Example
HTML:
<h1>My <a href="#">Example</a> Heading</h1>
CSS:
h1{
font-family: MyCustomFont, Helvetica, Arial, sans;
font-size:20pt;
color:#2F751F;
background-color:#fff;
}
h1 a{
font-family: AnotherCustomFont, Times, serif;
color:#2977C7;
text-decoration:underline;
}
h1 a:hover{
color:#eeb43f;
text-decoration:none;
}