In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-10-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to achieve font reference and transition effect outside the system". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. let's study and learn "how to achieve font reference and transition effect outside the system".
The code is as follows:
1. External font reference: use font-face to introduce fonts
Sometimes, we will use fonts that are not available in the system, and we may need to refer to the fonts we downloaded externally by:
The code is as follows:
Font reference
/ * use @ font-face to introduce fonts * /
@ font-face {
Font-family: heeh
/ * all three forms of yi are OK * /
/ * src:url ("Sansation_Light.ttf"); * /
/ * src:url ('Jian Wawa Zhuan .ttf'); * /
Src:url (Fang Zheng Pangwa simplified .ttf)
}
.tb {
Font-size: 80px
Color: # f40
Font-weight: 300
/ * declare the name of the referenced font here * /
Font-family: heeh
}
Taobao
2. Transition effect: attribute is transition
A transition effect before the effect is achieved when the mouse is moved to a certain area. Such as
The code is as follows:
Transiton (transition)
.div _ tran {
Width: 130px
Height: 100px
/ * An in rgba is transparency (range 0: 1) * /
Background: rgba (165, 237, 15, 0.5)
/ * background: rgb (165, 277, 15); * /
/ * transparency attribute opacity of css (range 031) * /
Opacity:. 3
Color: # 000
/ * both the annotated sentence and the following sentence are fine * /
/ *-webkit-transition:width 2sMagneHeigh 3sBackgroundrecoveryopacity 2.5s; * /
-webkit-transition:all 3s
}
.div _ tran:hover {
Width: 200px
Height: 200px
Background: rgb (28227209)
Opacity: 1
Color: red
}
/ * span {
Opacity: 1
Position: relative
Top:-100px
} * /
Transiton (transition)
Thank you for your reading, the above is the content of "how to achieve font references and transition effects outside the system". After the study of this article, I believe you have a deeper understanding of how to achieve font references and transition effects outside the system, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.