scss 인강을 들으면서 몰랐던 css 기능들에 대해서도 정리를 하려고 한다.
1) text-transform
2) text-shadow
text-shadow: <가로거리> <세로거리> <번짐 정도> <색상>
text-shadow: 1rem 4rem 1rem rgba(black, .5)
backface-visibility
1) background-clip
2) background-image
< linear-gradient >
backgroud color를 지정하기 위한 속성으로 시작점과 종료점에 지정할 2개의 색상이 기본적으로 필요하고, 중간 지점에 들어갈 컬러는 원하는만큼 지정 할 수 있다. 또한 색이 변하는 각도를 지정해줄 수 있다.
background-image: linear-gradient(to right bottom, $color-primary-light, $color-primary-dark);
background-image: linear-gradient(to right, red, yellow, blue); /* 중간 컬러를 넣을 수 있다. */
3) background-blend-mode
4) background-position
1) animation-timing-function
linear
: 일정한 속도ease
: 기본 값. 천천히- 빨리 - 다시 천천히ease-in
: 애니메이션 효과가 천천히 시작ease-out
: 애니메이션 효과가 천천히 끝난다.ease-in-out
: 천천히 시작해서 천천히 끝cubic-bezier(n,n,n,n)
: 사용자 정의 따라 진행2) animation-fill-mode
forwards
: 실행 된 애니메이션의 마지막 keyframe 에 의해 설정된 계산 값을 유지backwards
: 첫번째 keyframe에 정의 된 값을 적용하고 animation-delay 기간 동안 이 값을 유지.both
: 앞뒤 양쪽 모두의 규칙을 따르므로 애니메이션 속성이 양방향으로 확장1) rotate()
요소를 지정한만큼 회전
transform: rotateX(Ndeg)
: x축 기준 N도 만큼 회전transform: rotateY(Ndeg)
: y축 기준 N도 만큼 회전transform: rotate(Ndeg)
: N도 만큼 회전2) skew()
요소를 지정한만큼 x축 또는 y축으로 기울임
transform: skewX(10deg)
: x축 기준 10도 만큼 기울임transform: skewY(15deg)
: y축 기준 15도 만큼 기울임transform: skew(20deg)
: 20도 만큼 기울임contain
: 가로 세로비를 유지 하며 요소 컨텐츠 박스 내부에 들어가도록 크기 맞춤 조절.cover
: 대체 콘텐츠의 가로세로비를 유지하며, 요소 콘텐츠 박스를 가득 채움. 서로의 가로세로비가 일치하지 않으면 객체 일부가 잘려나간다.fill
: 요소 컨텐츠 박스 크기에 맞춰 대체 요소의 크기 조절. 컨텐츠가 컨텐츠 박스를 가득 채움.perspective: 150rem;
polygon(0 0, 100% 0, 100% 85%, 0 100%)`
// x1 y1 x2 y2 x3 y3 x4 y4
outline-offset
column-count
: 칼럼의 갯수 설정column-gap
: 칼럼 사이의 간격 설정column-rule
: 칼럼 사이에 들어갈 라인의 스타일을 지정&__text {
font-size: 1.4rem;
column-count: 2;
column-gap: 4rem;
column-rule: 1px solid $color-gray-lite-2;
-webkit-hyphens: auto;
hyphens: auto;
@include respond(phone) {
font-size: 1.2rem;
column-gap: 2rem;
}
}
이미지에 float을 주고 shape-outside로 요소의 테두리를 설정해주면, 자연스럽게 텍스트가 붙는다.
&:hover &__img {
transform: translateX(-3.5rem) scale(1);
filter: blur(3px) brightness(80%);
}
1) min-resolution
: 출력 장치의 해상도. 해상도는 dpi나 dpcm으로 정해진다.
@media (min-resolution: 192dpi){
...
}
//최소 192dpi 이상 해상도를 지닌 장치에 적용
2) orientation(가로, 세로 모드 확인)
@media (orientation: portrait) {
/* Portrait 모드일 때 적용할 CSS */
}
@media (orientation: landscape) {
/* Landscape 모드일 때 적용할 CSS */
}
사실 css속성은 아니지만 html5에서 figure
태그를 처음 써봐서 이게 무엇인지 알아 보려고 한다.
<figure>
요소는 독립적인 컨텐츠를 표현하고 <figcaption>
요소를 사용해 설명을 붙일 수 있다. <section class="gallery">
<figure class="gallery__item gallery__item--1">
<img src="img/gal-1.jpeg" alt="Gallery Image 1" class="gallery__img">
</figure>
<figure class="gallery__item gallery__item--2">
<img src="img/gal-2.jpeg" alt="Gallery Image 2" class="gallery__img">
</figure>
<figure class="gallery__item gallery__item--3">
<img src="img/gal-3.jpeg" alt="Gallery Image 3" class="gallery__img">
</figure>
</section>
https://developer.mozilla.org/ko/docs/Web/HTML/Element/figure