Q
그라데이션
0
A
답변
0
당신은 IMG 외부 그라데이션 용기를 사용하여 컨테이너 뒤에 밀어 화상의 마이너스 Z 인덱스를 설정할 수있다.
<div class="gradient-bg"> <img src="http://img.phombo.com/img1/photocombo/1634288/hd-wallpapers-scenic-desktop-wallpaper-beautiful-fresh-nature-scenery-sunrise-1920x1080-wallpaper.jpg"> <span>Hello There</span> </div>
.gradient-bg{
display: inline-block;
background: -moz-linear-gradient(bottom, rgba(0,0,0,0) 0%, rgba(249, 249, 249, 0.89) 100%);
background: -webkit-gradient(linear, left bottom, left bottom, color-stop(0%,rgba(0,0,0,0.65)), color-stop(100%,rgba(0,0,0,0)));
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(249, 249, 249, 0.89) 100%);
background: -o-linear-gradient(bottom, rgba(0,0,0,0) 0%,rgba(249, 249, 249, 0.89) 100%);
background: -ms-linear-gradient(bottom, rgba(0,0,0,0) 0%,rgba(249, 249, 249, 0.89) 100%);
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(249, 249, 249, 0.89) 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#a6000000', endColorstr='#00000000',GradientType=0);
}
span{
position: absolute;
top: 183px;
}
img{
position:relative;
z-index:-1;
display:block;
height:200px; width:auto;
}
사용 상고 폭 따라서 그라데이션.
0
보면 :
img {
width: 400px;
}
.content {
background: rgba(255, 255, 255, 0) linear-gradient(to bottom, rgba(0, 0, 0, 0) 10%, rgba(255, 255, 255, .1) 40%, rgba(255, 255, 255, .5) 75%, rgba(255, 255, 255, 1) 100%) repeat scroll 0 0;
position: relative;
margin-top: -200px;
height: 200px;
}
<img src="http://www.dl.21tech.ir/img-upload/2016/12/95092801.jpg" />
<div class="content"></div>
관련 문제
- 1. CSS의 그라데이션
- 2. 그라데이션 스타일
- 3. 사각형은 그라데이션
- 4. 웹킷 그라데이션
- 5. 그라데이션 색상
- 6. 그라데이션 배경
- 7. 그라데이션 링크에서
- 8. 캔버스 그라데이션
- 9. 이미지 그라데이션
- 10. 그라데이션 상대
- 11. HTML5는 그라데이션
- 12. 플래시 - 그라데이션
- 13. 그라데이션 오류
- 14. UIPickerView 그라데이션 테두리 제거
- 15. IE에 그라데이션 표시
- 16. 다른 그라디언트에 모질라 그라데이션
- 17. JQuery와는 그라데이션 이미지 높이
- 18. 교차 선형 그라데이션 만들기
- 19. 투명 그라데이션 메뉴
- 20. 클릭시 그라데이션 경계
- 21. 안드로이드에 그라데이션 오류가 있습니다.
- 22. 생성 NaN의 그라데이션
- 23. 호버상의 jQuery 배경 그라데이션
- 24. UINavigationBar 그라데이션 세부 정보
- 25. QProgressBar에서 청크의 그라데이션
- 26. 그라데이션 배경 UIScrollView
- 27. 그라데이션 스트로크 모양
- 28. 그라데이션 설정이 잘못 되었습니까?
- 29. 선형 그라데이션 우분투
- 30. 그라데이션 알파의 drawRect
지금까지 어떤 시도를 했습니까? –