Home > Web Front-end > CSS Tutorial > CSS implements WEB standard menu effect code with inverted triangle mark

CSS implements WEB standard menu effect code with inverted triangle mark

不言
Release: 2018-06-05 15:29:19
Original
1949 people have browsed it

This article mainly introduces CSS to implement the WEB standard menu effect code with an inverted triangle mark. It uses pure CSS to achieve the display effect of the inverted triangle mark when the mouse slides over it. It is very simple and practical. Friends who need it can refer to it

The example in this article describes the CSS implementation of the WEB standard menu effect code with an inverted triangle mark. Share it with everyone for your reference. The details are as follows:

Here is a demonstration of the WEB standard menu with an inverted triangle mark implemented in css.

The specific code is as follows:

Copy code

The code is as follows:

<html>
<head>
<title>带倒三角标记的WEB标准菜单</title>
<style>
 <!--
#menu {width:500px;padding:0;margin:40px auto;list-style-type:none;}
#menu li {width:100px; float:left; line-height:30px}
#menu a {position:relative;display:block; text-decoration:none; background:#cccccc;width:100px; }
#menu a span {display:block; font-weight:bold;color:#000; border-style:solid;border-width:0px 2px 2px 0px; border-color:#fff #fff #06a #fff;text-align:center; }#menu a em {display:none;}
#menu a:hover {background:#FF0000;}
#menu a:hover span {color:#fff; }
#menu a:hover em {display:block; overflow:hidden; border:6px solid #06a; border-color:#06a #fff; border-width:6px 6px 0 6px; position:absolute; left:50%; top:100%;margin-left:-6px;}
 -->
 </style>
</head>
<body>
 <ul id="menu">
 <li><a href="#"><span>脚本之家</span><em></em></a></li>
 <li><a href="#"><span>网页特效</span><em></em></a></li>
 <li><a href="#"><span>示例菜单</span><em></em></a></li>
 <li><a href="#"><span>网站导航</span><em></em></a></li>
 </ul>
</body>
</html>
Copy after login

Related Recommended:

Use pure CSS to implement prohibition of mouse click events sample code

The above is the detailed content of CSS implements WEB standard menu effect code with inverted triangle mark. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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