html - 请问这个图片上打钩图标是用CSS写的吗?
PHP中文网
PHP中文网 2017-04-17 12:07:15
0
5
571

这是鼠标还没移动上去之前

这是鼠标移上去之后的效果

刚学习html和css没多久,今天仿站的时候这个部分,在原文件里面并没有字母前面那个打钩的图片。是用css写的吗?
是怎么实现的呢?

能告诉我的话,真的是感激不尽!!!谢谢

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(5)
Peter_Zhu

Pseudo element. In fact, you don’t even need font icons, you can do it with pure CSS. The hook only needs to rotate a p with only two border lines...

大家讲道理

To make fonts, you can refer to Fnt-Awesom. There are many kinds of fonts. Just click and add the corresponding class to change the color

大家讲道理

Visually it is iconfont

刘奇

Please search for iconfont, which is the icon font.

is to make the graphic into a font, and then use the CSS ::before pseudo-element to insert it in front of the element.

巴扎黑

I haven’t seen the source code, but there should be two styles. The background images of the two styles are different images.
For example, the default is a style without √, background-url(xxx), the one without √ is used here. Image path
js monitors the hover event, removes the a style, and adds the b style. At this time, the background-url (xxx) of the b style is the image path with √.
I am not a professional in writing css. If it is wrong, still Please point it out.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template