728x90
반응형
728x90
반응형
<!DOCTYPE html>
<html lang="ko">
<head>
    <meta charset="UTF-8">
    <title>Document</title>

    <style>
        *{
            /*상수 값 만들기*/
            --title-horizontal-space:2.75rem;
        }
        /* 
            filter
                -blur(a) : a는 길이, a만큼 흐리게 한다. 적을수록 덜 흐려진다(블러)
                -brightness(a) : a는 비율 100%를 기준으로 이미지를 어둡게, 혹은 밝게 한다. (0%: 오나전 어둡게 ~ ?% 매우 밝게)(명도)
                -contrast(a) : a는 비율. 100%를 기준으로 이미지 대비를 조절한다. (색의 진하기정도.)(대비)
                -grayscale(a) : a는 비율. 0%(기본값)부터 100%까지, 이미지의 그레이스케일을 조절(0%는 풀컬러, 100%는 흑백)(채도)
                -invert(a) : a는 비율. 0%(기본값)부터 100%까지. 이미지를 색 반전 시킨다 ( 반전)
        */
        a.button {
            display: block;
            /* 중앙정렬 */
            top: 50%;
            left: 50%;
            position: absolute;
            transform: translate(-50%, -50%);
            width: 30rem;
            height: 20rem;
            border: 1px solid #DDD;
            color: cadetblue;
            overflow: hidden;
        }

        .button > .background{
            display: block;
            width: 100%;
            height: 100%;
            position: absolute;
            background-image: url(../Resource/restaurant.jpg);
            filter: brightness(75%);
            background-position: center;
            background-repeat: no-repeat;
            background-size: cover;
            z-index: 0;
            transition-duration: 400ms;
        }

        .button:hover > .background {
            transform: scale(110%);
        }


        .button > .content {
            top: 0;
            left: 0;
            position: absolute;
            width: 100%;
            height: 100%;
            z-index: 99;
        }

        .button > .content > .title {
            position: relative;
            left: 0;
            width: 100%;
            font-size: 1.75rem;
            background-color: deepskyblue;
            padding: 1.25rem;
            margin-block-end: 0;
            margin-block-start: 0;
            box-sizing: border-box;
            padding: 1.25rem var(--title-horizontal-space);
        }

        .button > .content > .title > .arrow {
            position: absolute;
            top: 50%;
            right: var(--title-horizontal-space);
            width: 2rem;
            height: 2rem;
            background-color: white;
            border-radius: 50%;
            background-image: url(../Resource/화살표.jpg);
            background-position: center;
            background-repeat: no-repeat;
            background-size: contain;
            transition-duration: 0.5s;            
            transform: translateY(calc(-50% + 1rem));
            opacity: 0;
        }

        .button:hover > .content > .title > .arrow {
            transform: translateY(-50%);
            opacity: 1;
        }


        .button > .content > .exp {
            display: block;
            bottom: 0;
            position: absolute;
            line-height: 150%;
            padding: 2rem var(--title-horizontal-space);
            text-align: justify; /* 텍스트를 양쪽 끝 맞추세여*/
            opacity: 0;
            background-color: cornflowerblue;
            font-size: 1.5rem;
            font-weight: bold;
            color: black;
            transform: translateY(1rem);
            transition-duration: 0.5s;
            opacity: 0;
        } 

        .button:hover > .content > .exp {
            transform: translateY(0);
            opacity: 1;
        }





    </style>
</head>
<body>
    <a class="button" href="#">
        <span class="background"></span>
        <span class="content">
            <h2 class="title">
                <span>입점래스토랑 안내</span>
                <span class="arrow"></span>
            </h2>
            <span class="exp">동대구 메리어트에 입점해 있는 레스토랑에서 즐러운 시간 보내세요</span>
        </span>
    </a>
</body>
</html>
728x90
반응형

'정보 > WEB' 카테고리의 다른 글

animation 예제1  (0) 2022.12.29
transform연습  (0) 2022.12.29
transform3  (0) 2022.12.29
teansform2  (0) 2022.12.29
teansform기본  (1) 2022.12.29
728x90
반응형
<!DOCTYPE html>
<html lang="ko">
    <head>
        <title>transition</title>
            <meta charset="UTF-8">
            <style>
                img {
                    width: 500px;
                    /* transition : 요소가 영향을 받는 선택자가 변경될 때 변경되는 CSS 속성에 대해 변화가 완료되기 까지 걸리는 시간과 방법에 대해 정의한다.*/
                    transition-duration: 5000ms;
                    /* transition-duration : transition이 완료되기 까지 걸리는 시간 지정. ms 혹은 s단위 사용.*/
                    transition-timing-function: ease;
                    /* transition-timing-function: 변화가 생긴 속성이 적용되는데 사용될 함수 지정.
                    ease-in : 시작은 느리게 끝은 빠르게
                    ease-out : 시작은 빠르게 끝은 느리게
                    ease-in-out : 시작과 끝은 느리게 중간이 빠르게
                    ease : ease-in-out이랑 비슷한데 시작이 좀 더 빠름
                    linear : 선형
                    cubic-bezier : 사용자 지정 입방체 베지어곡선에 따름 모든 함수는 시간대비(0~tran'-dur') 속성 변환 완료율(%)에 따른 2~3차 방정식을 풀이 될 수 있다.
                    */
                    transition-property: ;
                    /* transition-property : 변화하는 속성을 제한한다. 속성을 콤마로 구분하여 여러개를 사용할 수 있음*/
                    /* transition 을 적용하는 모든 속성은 중간값이 있어야 한다.
                    가령, display나 position은 적용되지 않으며 width 나 height 같은 경우 또한 auto에서 리터럴로 적용할 수 없다.*/
                }

                img:hover {
                    filter: blur(10px) grayscale(100%);
                }
            </style>
    </head>
    <body>
        <img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMSEhUSExMVEhUXGBcWFxUYFRcVFRUXFhUWFxgVFRcYHSggGBolGxUWITEhJSkrLi4uFx8zODMtNygtLisBCgoKDg0OGxAQGi8lHyUtLS0tLSstLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLf/AABEIANsA5gMBIgACEQEDEQH/xAAcAAEAAQUBAQAAAAAAAAAAAAAAAwIEBQYHAQj/xAA6EAACAQIEBAMGBQMDBQEAAAAAAQIDEQQFITEGEkFRImFxEzKBkaGxB1LB0fCC4fEjkqIVJEJiwhT/xAAbAQEAAgMBAQAAAAAAAAAAAAAAAQMCBAUGB//EACwRAAICAQMCBAUFAQAAAAAAAAABAgMRBBIhMUEFE1FhIjJxkaEUI1KB0UL/2gAMAwEAAhEDEQA/AO4gAAAAAAGNzXPaOHsqktdPCrOSTvq1fbTcwnOMFuk8IhtJZZkgaZi+OLS8EE42XvaSvrfZ2asavWz+ve/tJ2cnJeJ+GWuifbXY5tvi9MXiHxFE9TCPudaUk+u2/kenIf8ArNXnlPnknO6lZ2v8vQ2DKeL6kE41P9XRcuye9tX19TCvxmpyxOLS9epjHVRbwzfgYbDcSUJuKUmuZbtWSf5WZiEk1dO67o6dV9dvyST+hsqSfQ9ABaSAAAAAAAAAAAAAAAAAAAAAAAAAAADyUkld6Jas9NU/EWFZ4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vobWUVIppp6p6MhrKwZ1zcJKSPmTH4Vxb+v7mOvZnRePeH3QqNpXjL3X5djn+IpmjOOGeu01ynBNEcZ23JqT6lq2SUqhU0bG4u27ijpqW8atySVZW9THaRvJqta2nRogmyirO6RTBmSiYeYimepUkrFKkeSmTgjcVSKXK55OZTFjBmpFe5kcDhm2tPL1LPDwN84FyB4iorq0VrJ+RZCOWU6i5Qg2zoH4fZN7KkqjWrWnp3NvKKMFFKK0SVkVm8lhYPJW2OcnJgAElYAAAAAAAAAPLhnjAFzy5SzxsAr5ilyKblEmAY7P8uhiaTpy9Yvszh3EuTTw9SUZK3Z9JLyO8V2YDPMBTrxcakeZdH1XoyuyCkbml1cqXjsfP9XTQj5tTcOIeDakG5Umqsez8M1+jNLxlKdNtTjKD800a+zB2Fq4yWUyTnsVuojHSxFyl4jzI2EfqDISqHimY9Vr7XZ77e25O0eejJc5RzlksR5hV7diNpPnovb6ldLUgwtOdR2hGUn5Jv6m48PcH1JtSqtU49l4pv8AREqDYerjBcsi4cyedecYRV317JeZ3LhzLIYakoR1e8n3f7GHyLL6dCKjTjZdX1fqzYsMzYhBROPqtXK547GRiyshpkqLDTPQAAAAAAAAAAACloqDAKGinlJDxgEfKUyiTHjQBY1qZjcTQM3NFrWigDU8dg2zWMyyxvpc6JXguxjcRSj2MGi+FmDlOKyGL3pxf9KLGWSJbU4r+lHUa9CPZFnUw0Pyow2l/mL0Ocf9Nl2serLZdVf4HQXhoflR7HDQ/KhtIdpoMMlT3px/2ovMPkS6U4r+lG8U8PH8qLujQj2RltK3aazl+UNdDacvwNi+w9GPYyNGC7GSRTKTZThqJk6ECilFF3TRkYEsESooiVgAAAAAAAAAH//Z">
    </body>
</html>
728x90
반응형

'정보 > WEB' 카테고리의 다른 글

배열  (0) 2022.12.25
for(반복문)  (0) 2022.12.25
transform(요소의 형태나 위치를 변환)  (1) 2022.12.24
padding(외부 여백)  (0) 2022.12.24
position  (0) 2022.12.24

+ Recent posts

728x90
반응형
">