I am using @font-face to use custom fonts like this
@font-face {
font-family: 'Simpletext';
src: url('MYRIADPRO-REGULAR.woff') format('woff');
}
now when i want to use this i am doing like this
<p style="font-family:Simpletext ;">Lorem Ipsum is simply dummy text </p>
<span style="font-family:Simpletext ;">Lorem Ipsum is simply dummy text</span>
Now instead of repeating this will someone guide me how can i define it just like a class rule and reuse it like this
<p class="Simpletext"></p>
This is regular CSS. Please check a tutorial or similar. This does not apply to @font-face
<style>
.your-class {
font-family:"Simpletext";
}
</style>
<p class="your-class">Lorem Ipsum is simply dummy text </p>
<span class="your-class">Lorem Ipsum is simply dummy text</span>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.