Suggestion: Handwriting code as much as possible can effectively improve learning efficiency and depth. By default, you can use the title attribute of the <a> tag to achieve a link prompt effect. For example Copy code The code is as follows:View Code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <head> <title>Ant Tribe</title> </head> <body> <a href="http://www.softwhy.com" title="Ant Tribe">Ant Tribe</a> </body> </html> Although the above code can achieve the link prompt effect, it often cannot meet the actual needs. You may need to customize the link prompt effect that is more beautiful or matches the page. The code example is as follows Copy code The code is as follows:View Code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="author" content="http://www.softwhy.com/" /> <head> <title>Ant Tribe</title> <style type="text/css"> ul { list-style:none; font-size:14px; } li { width:100px; height:30px; line-height:30px; float:left; text-align:center; position:relative; border:1px solid red; } span { display:none; } a:link,a:visited { text-decoration:none; } a:hover .tishi { display:block; width:100px; height:30px; background-color:#6C9; line-height:30px; text-align:center; position:absolute; left:80px; top:40px; color:#FFFFFF; } </style> </head> <body> <ul> <li> <a href="#" class="mylink">DIV+CSS<span class="tishi">DIV+CSS</span></a> </li> <li> <a href="#" class="mylink">jQuery<span class="tishi">jQuery</span></a> </li> <li> <a href="#" class="mylink">JS<span class="tishi">JS</span></a> </li> <li> <a href="#" class="mylink">HTML<span class="tishi">HTML</span></a> </li> <div style="clear:both"></div> </ul> </body> </html> The above code successfully achieves the effect we want. The main method is to use the hyperlink pseudo-class to display the span element |
<<: Implement a simple search engine based on MySQL
>>: idea uses docker plug-in to achieve one-click automated deployment
1. A container is an independently running applic...
During the project optimization today, MySQL had ...
MySQL deduplication methods 【Beginner】There are v...
Table of contents Preface toDoList just do it Pre...
Table of contents Preface 1. Style penetration 1....
Table of contents 1. Create a new project 2. Add ...
Preface When developing WeChat applets, you often...
As the number of visits increases, for some time-...
Effect: Ideas: Use the input type attribute to di...
CentOS7 is used here, and the kernel version is [...
Preface: Partitioning is a table design pattern. ...
As the application of centos on the server side b...
Not only does it reduce the cost of website develo...
Preface The computer I use is a Mac, and the oper...
Take zabbix's own WEB interface as an example...