Home > Web Front-end > HTML Tutorial > css实现table中td单元格鼠标悬浮时显示更多内容_html/css_WEB-ITnose

css实现table中td单元格鼠标悬浮时显示更多内容_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:26:08
Original
1191 people have browsed it

table中,td单元格无法显示下全部内容,需要在鼠标hover时显示全部内容。

正常显示样式:

鼠标hover时:

html:

<td>displayAddress<span class="tdtip">popAddress</span></td>
Copy after login

css:

td{    position:relative;     z-index:2;}td:hover{    z-index:3;    background:none; }td .tdtip  {    display: none;}td:hover .tdtip  {     display: block;    position: absolute;    top: 8px;     background-color: whitesmoke;    color: royalblue;    word-break: break-all;}
Copy after login

 

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