CSS3 text-overflow Property
Use of the text-overflow property:
div {
text-overflow: ellipsis;
}
text-overflow: ellipsis;
}
Definition and Usage
The text-overflow property specifies how overflowed content that is not displayed should be signaled to the user.
Default value: |
clip |
---|---|
Inherited: |
no |
Animatable: |
|
Version: |
CSS3le.textOverflow="ellipsis" |
JavaScript syntax: |
object.style.textOverflow="ellipsis" |
CSS Syntax
text-overflow: clip|ellipsis|string|initial|inherit;
Property Values
Value |
Description |
clip |
Default value. Clips the text |
ellipsis |
Render an ellipsis ("...") to represent clipped text |
string |
Render the given string to represent clipped text |
initial |
Sets this property to its default value. |
inherit |
Inherits this property from its parent element. |
Example
<style>
#div1 {
white-space: nowrap;
width: 12em;
overflow: hidden;
text-overflow: clip;
border: 1px solid #000000;
}
#div2 {
white-space: nowrap;
width: 300px;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
This document refers to W3Schools.com
반응형
'Frontend > html5' 카테고리의 다른 글
실전 HTML 5 가이드 - Web Standards Korea (0) | 2010.12.26 |
---|
댓글