그림자가있는 부분이 실제로 그 뒤에있는 내용의 투명한 창인 마스크 된 로고를 만들려고합니다. 내가 SVG 및 마스킹 이것을 해결하기 위해이 생각하고 SVG/CSS : 마스크 된 헤더 로고
하지만, 여기에 본 나의 시도는 정말 잘 가지 않았다 :
디자인이 같다
@charset "utf-8";
*{margin:0;padding:0}
body{
\t width:100%;
\t min-height:100%;
\t background-color:#eee;
\t color:#eee;
}
/*Header
-------------*/
header{
\t position:fixed;
\t top:0;
\t width:100%;
\t height:20%;
\t height:auto;
\t z-index:999;
}
#logo:before{
\t width:10%;
\t height:15vw;
\t display:block;
\t content:"";
\t background:#fff;
\t float:left;
}
#logo:after{
\t width:80%;
\t height:15vw;
\t display:inline-block;
\t content:"";
\t background:#fff;
}
#logo img{
\t float:left;
\t width:10%;
}
/*Content
-------------*/
main{
\t position:relative;
\t margin:auto;
\t width:100%;
\t height:200%;
\t background:#2d917f
}
/*Links
-------------*/
a,a:visited{
\t color:#eee;
\t text-decoration:none;
\t -webkit-transition:all .2s ease;
\t -moz-transition:all .2s ease;
\t -o-transition:all .2s ease;
\t transition:all .2s ease;
}
a:active, a:hover{
\t color:#fff;
\t border-bottom:1px solid #fff
}
/*Scrollbar
-------------*/
::-webkit-scrollbar{width:12px;height:12px;background-color:#1A1A1A}
::-webkit-scrollbar-corner{background-color:#0e0e0e}
::-webkit-scrollbar-track{background-color:#121212}
::-webkit-scrollbar-thumb{background:#2d917f}
::-webkit-scrollbar:horizontal{height:12px}
/*Selection
-------------*/
::selection{color:#fff;background-color:#2d917f}
::-moz-selection{color:#fff;background-color:#2d917f}
<header>
\t <div id="logo">
\t \t <img src="https://ap-images.ga/up/2017/05/11151821-Logo2.svg" title="11145933-Logo.svg" alt="11145933-Logo.svg"/>
\t </div>
</header>
<main>
</main>
: https://codepen.io/RafaelDeJongh/pen/PmROPW
누구나 내가이 문제를 어떻게 해결할 수 있을지 잘 모르겠다. 일반적으로 요소 (이 경우 헤더)의 특정 부분을 마스크하는 방법은 무엇입니까?
미리 감사드립니다.
사용 위치 절대 –
. 솔직히 말해서별로 의미가 없지만 기본 항목이 배경색으로 덮여 있다는 사실은 바뀌지 않습니다. –