How to use CSS to style the little hand when the mouse is over

藏色散人
Release: 2022-12-30 11:12:50
Original
12291 people have browsed it

CSS method to make a small hand style appear when the mouse is placed: First create an HTML sample file; then add a span tag to the body; then add the "cursor:pointer;" style to the tag to achieve the effect. When the mouse is placed, a small hand style will appear.

How to use CSS to style the little hand when the mouse is over

The operating environment of this tutorial: windows7 system, HTML5&&CSS3 version, DELL G3 computer.

Recommended: css video tutorial

How to make the little hand style when the mouse is placed in CSS?

In CSS, you can add the cursor:pointer; style to the element to style the small hand when the mouse is placed.

The cursor attribute defines the cursor shape used when the mouse pointer is placed within the bounds of an element; the attribute value pointer allows the cursor to appear as a pointer (a hand) indicating a link.

Example:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
</head>
<body>
<p>请把鼠标移动到下面的文本上,可以看到鼠标指针发生变化:</p>
<span style="cursor:pointer">设置为pointer值,指针变为小手样式</span><br>
</body>
</html>
Copy after login

Rendering:

How to use CSS to style the little hand when the mouse is over

Attribute value of cursor attribute:

How to use CSS to style the little hand when the mouse is over

The above is the detailed content of How to use CSS to style the little hand when the mouse is over. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!