Home  >  Article  >  Web Front-end  >  A simple JS mouse hover effect specific method_javascript skills

A simple JS mouse hover effect specific method_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:32:131254browse

First, you need to load the jquery library (skip).

Secondly, add the following Javascript code to the head of the page:

Copy the code The code is as follows:



No. Third, add to the style:
Copy code The code is as follows:

a {position: relative }

Done.

Simply define the a:hover style, which seems to be simpler:
Copy the code The code is as follows:

a:hover { padding: 0 0 0 8px;}

It’s just not natural enough.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn