---
title: "超长标题自动省略的CSS"
author: "samjavaeye"
date: "2012-10-10T09:48:40Z"
tags: []
categories: ["Web前端"]
slug: "css"
draft: false
lastmod: "2012-10-10T09:48:40Z"
id: 1694856
url: "https://samjavaeye.iteye.com/blog/1694856"
---

.titleLink {width:480px; overflow:hidden; white-space:nowrap; text-overflow: ellipsis; display:block;}

显示的效果为超过指定的宽度（width值）时，超过部分显示成省略号。