css: multi column, table, transition, trasform

2020. 12. 10. 17:18퍼블리싱/CSS

반응형

 

 

multi column

column-count 단 갯수

column-gap 단 간격

column-rule 구분선

 

table

border-collapse:collapse; 테두리 합치기

 

transition

transition-duration

transition-property: 위치, 크기, margin/padding, border, color/background,  opacity, transform

transition-delay

transition-timing-function: ease(default), cubic-beizier

 

cubic-beizer

 

https://cubic-bezier.com/

 

cubic-bezier.com

 

cubic-bezier.com

 

transform

:translate() px, % / 이동

:scale() 배수(숫자) / 크기 변경

:skew() deg / 기울기

:rotate() deg /회전

 

 

#nav>li:after{
    content:"";
    display: block;
    width:2px;
    height:12px;
    background:#3e3360;
    position: absolute;
    right:0;
    top:50%;
    transform:translateY(-50%) skewX(-20deg);
}

 * position 세로정렬: top:50%; transform:translateY(-50%)

 

 

 

움직이는 테두리

 

예제:

http://www.busantower.net/index.asp

.box > li {
    width: 300px;
    height: 400px;
    float: left;
    background-color: azure;
    margin: 20px;
    position: relative;
    border: 1px solid forestgreen;
    box-sizing: border-box;
}

.box > li:hover {
    border-color: transparent;
}

/*li 수직선*/

.box > li::before,
.box > li::after,
.box > li > a::before,
.box > li > a::after {
    content: "";
    display: block;
    background-color: forestgreen;
    position: absolute;
    transition: 1s;
}

.box > li::before,
.box > li::after {
    width: 1px;
    height: 0%;
}

.box > li::before {
    bottom: 0;
    left: -1px;
}

.box > li::after {
    top: 0;
    right: -1px;
}

.box > li:hover::before,
.box > li:hover::after {
    height: 100%;
}

.box > li > a {
    display: block;
    font-size: 20px;
    text-align: center;
    line-height: 400px;
    position: relative;
}

/*a 수평선*/

.box > li > a::before,
.box > li > a::after {
    width: 0%;
    height: 1px;
}

.box > li > a::before {
    top: -1px;
}

.box > li > a::after {
    right: 0;
    bottom: 1px;
}

.box > li:hover > a::before,
.box > li:hover > a::after {
    width: 100%;
}
반응형