티스토리 뷰
[css , mixin] 말줄임 - ie 에서만 1줄, 그 외 브라우저 2~3줄
.title {
//그외 브라우저
@include text-cut(2);
//ie 안에선 1줄
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
@include text-cut;
display: block;
height: auto;
}
}
//mixin
@mixin text-cut($c:"") {
@if $c != ""{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: $c; /* 라인수 */
-webkit-box-orient: vertical;
word-wrap:break-word;
}@else{
text-overflow:ellipsis;
white-space: nowrap;
overflow: hidden;
}
}
ie 구분 css
/* IE10+ */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
/* Enter your style code */
}
/* IE6,7,9,10 */
@media screen and (min-width: 640px), screen\9 {
/* Enter your style code */
}
/* IE6,7 */
@media screen\9 {
/* Enter your style code */
}
/* IE8 */
@media \0screen {
/* Enter your style code */
}
/* IE6,7,8 */
@media \0screen\,screen\9 {
/* Enter your style code */
}
/* IE9,10 */
@media screen and (min-width:0\0){
/* Enter your style code */
}
'Coding > CSS' 카테고리의 다른 글
[UI] [CSS] radio buttons (0) | 2021.03.25 |
---|---|
[CSS] Dropdown <details> and <input type="radio"> (0) | 2021.03.23 |
[CSS `transform: scale`] Flip upside-down (0) | 2021.01.26 |
[CSS Grid] Layout Templates (0) | 2021.01.26 |
[CSS] 3D Town animation (0) | 2020.10.28 |
댓글
© 2018 eh2world