Home >Web Front-end >JS Tutorial >jquery adds a border effect to the image when the mouse passes over it_jquery

jquery adds a border effect to the image when the mouse passes over it_jquery

WBOY
WBOYOriginal
2016-05-16 17:15:511407browse

A friend wants to add a border effect to the picture when the mouse passes over it. Unfortunately, he started from the wrong point. He added it directly to the A tag outside the IMG, causing the picture to collapse when the mouse passes over it. In fact, the border control should be added directly to the IMG tag.
The error code is as follows: Pay attention to the red part setting (the starting point is wrong)

Copy the code The code is as follows:















The correct design idea after modification : The red part is the adjusted settings
Copy the code The code is as follows: