I recently learned that css has such a side of the box ~~~
Make a page similar to a forum. The user's profile picture is 70px, but the user name cannot be limited. It can be used in both Chinese and English. What should you do if you say "my name is long ", then, the old lady will not be in a hurry ~~
Fortunately, I am lucky to find the side of css, which I have never known before. I will write it out and share it with you.
Very simple, big fart not much put, open chrysanthemum directly:
The settings in css are as follows:
A. name {line-height: 30px; text-align: center; text-overflow: ellipsis; // used for exceeding... implement white-space: nowrap; // disable line feed overflow: hidden; // hide: block beyond the limit ;}
I am a user name written using the tag, so I need to display: block it.
Well, it's very simple, but it's easy to use.
(PS: IE6 not supported !)
Please add QQ: 1740437 for any advice