Copy code The code is as follows:<span style="font-family: Arial, Helvetica, sans-serif;"><span style="font-size:14px;">1. External font reference: use font-face to introduce fonts</span></span> Sometimes, we need to use some fonts that are not in the system. We may need to reference the fonts we downloaded from the outside. The method is: Copy code The code is as follows:<!DOCTYPE html> <html> <head> <title>Font Reference</title> <meta charset="utf-8"> <style type="text/css"> <span style="white-space:pre"> </span>/*Use @font-face to introduce fonts*/ @font-face{ font-family: heeh; /*The following three forms are all possible*/ /*src:url("Sansation_Light.ttf");*/ /*src:url('简娃娃篆.ttf');*/ src:url(Fangzheng Fat Baby Simplified.ttf); } .tb{ font-size: 80px; color: #f40; font-weight: 300; <span style="white-space:pre"> </span><span style="white-space:pre"> </span>/*Declare the name of the referenced font here*/ font-family: heeh; } </style> </head> <body> <h1 class="tb">Taobao</h1> </body> </html> 2. Transition effect: attribute is transition When the mouse moves to a certain area, a transition effect occurs before the effect is achieved. like Copy code The code is as follows:<!DOCTYPE html> <html> <head> <title>transiton</title> <meta charset="utf-8"> <style type="text/css"> .div_tran{ width: 130px; height: 100px; /*a in rgba is transparency (range 0~1)*/ background: rgba(165,237,15,0.5); /*background: rgb(165,237,15);*/ /*css transparency property opacity (range 0~1)*/ opacity: .3; color: #000; <span style="white-space:pre"> </span>/*This comment and the following sentence are both acceptable*/ /*-webkit-transition:width 2s,height 3s,background,opacity 2.5s; */ -webkit-transition:all 3s; } .div_tran:hover{ width: 200px; height: 200px; background: rgb(28,227,209); opacity: 1; color: red; } /* span{ opacity: 1; position: relative; top: -100px; }*/ </style> </head> <body> <div class="div_tran"> transiton </div> <!-- <span>transiton</span> --> </body> </html> |
<<: Detailed explanation of the marquee attribute in HTML
>>: Detailed explanation of JavaScript Proxy object
In the previous article [Detailed explanation of ...
In order to make the table fill the screen (the re...
1. Edit the docker.service file vi /usr/lib/syste...
This article shares the specific code of the WeCh...
This axios package is used in the vue3 demo. For ...
1. Prepare the Docker environment 2. Search for f...
Object's hasOwnProperty() method returns a Bo...
Recently I wrote in my blog that in the project l...
Recently, the following effects need to be achiev...
Here's a solution to the problem where margin...
Use wget command to download the entire subdirect...
Table of contents 1. Variable Overview 1.1 Storag...
Purpose Understand the Nginx ngx_http_limit_conn_...
Table of contents Preface Ajax serial and paralle...
To learn content-type, you must first know what i...