HTML/CSS/JAVASCRIPT 강의실

시삽: 레드플러스 님 
게시판 이동:
 제목 : 브라우저 왼쪽/오른쪽 중간에 항상 고정된 텍스트/이미지 배치하기
글번호: 264
작성자: 레드플러스
작성일: 2014/04/15 오후 12:12:00
조회수: 3085
파일: ViewSwitcher.png (4 KB) / 전송수: 1425
ViewSwitcher.png
Bootstrap 3를 활용하여,

웹 브라우저의 좌우에 특정 텍스트 또는 이미지를 배치하고자할 때 사용할만한

스타일시트입니다.

페이지를 전환하는 뷰 스위처(View Switcher) 역할로 만들어 봤습니다.




    <style>
        .view-switcher-control {
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            width: 5%;
            opacity: 0.5;
            filter: alpha(opacity=50);
            font-size: 20px;
            color: #ffffff;
            text-align: center;
            -webkit-text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
            text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
        }

            .view-switcher-control.left {
                background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.5) 0%), color-stop(rgba(0, 0, 0, 0.0001) 100%));
                background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
                background-repeat: repeat-x;
                filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=''#80000000'', endColorstr=''#00000000'', GradientType=1);
            }

            .view-switcher-control.right {
                left: auto;
                right: 0;
                background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.0001) 0%), color-stop(rgba(0, 0, 0, 0.5) 100%));
                background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
                background-repeat: repeat-x;
                filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=''#00000000'', endColorstr=''#80000000'', GradientType=1);
            }

            .view-switcher-control:hover,
            .view-switcher-control:focus {
                outline: none;
                color: #ffffff;
                text-decoration: none;
                opacity: 0.9;
                filter: alpha(opacity=90);
            }
            .view-switcher-control .icon-prev,
            .view-switcher-control .icon-next,
            .view-switcher-control .view-switcher-icon-left,
            .view-switcher-control .view-switcher-icon-right {
                position: absolute;
                top: 50%;
                z-index: 5;
                display: inline-block;
            }

            .view-switcher-control .icon-prev,
            .view-switcher-control .view-switcher-icon-left {
                left: 50%;
            }

            .view-switcher-control .icon-next,
            .view-switcher-control .view-switcher-icon-right {
                right: 50%;
            }

        @media screen and (max-width: 768px) {
            .view-switcher-control,
            .view-switcher-control .view-switcher-icon-left,
            .view-switcher-control .view-switcher-icon-right,
            .view-switcher-control .icon-prev,
            .view-switcher-control .icon-next {
                display: none;
                visibility: collapse;
            }
        }

    </style>


    <a class="view-switcher-control left" href="#">
        <span class="view-switcher-icon-right"><img src="images/right_arrow.png" /></span>
    </a>
    <a class="view-switcher-control right" href="#">
        <span class="view-switcher-icon-right"><img src="images/right_arrow.png" /></span>
    </a>
 
이전 글   다음 글 삭제 수정 답변 글쓰기 리스트

(댓글을 남기려면 로그인이 필요합니다.)

관련 아티클 리스트
  제       목 파일 작성자 작성일 조회
이전글 성적처리 예제(1차원 배열 사용) (1) - 레드플러스 2014-06-06 3036
현재글 브라우저 왼쪽/오른쪽 중간에 항상 고정된 텍스트/이미지 배치하기 ViewSwitcher.png(4 KB) 레드플러스 2014-04-15 3085
다음글 텍스트상자의 엔터키 이벤트 잡기 JavaScriptTextBoxEnterKey.png(125 KB) 레드플러스 2014-03-11 2716
 
손님 사용자 Anonymous (손님)
로그인 Home