---
title: "div,span标签title属性"
author: "deng131"
date: "2011-06-07T21:59:07Z"
tags: []
categories: ["Web前端"]
slug: "div-span-title"
draft: false
lastmod: "2011-06-07T21:59:54Z"
id: 1072198
url: "https://thinking80s.iteye.com/blog/1072198"
---

<span style="color:red">div,span标签title属性：规定元素的额外信息（可在工具提示中显示）</span>

鼠标放在这个层上面的时候会出现一个提示那就是你title的内容.类似于img的alt 。

今天在实现查看图片左右区域显示上一张，下一张效果时候使用到该功能，平时很少用到，原来可以使用div或者span的title属性实现鼠标放在这个层上面的时候会出现提示信息。

参考：
<http://www.w3school.com.cn/tags/html_ref_standardattributes.asp>