CSS에서 이와 같은 일을 할 수 있습니까? 나는이 선 의미 : http://image.prntscr.com/image/54a38b236b954a16af9766747931ca61.pngCSS에서 여러 줄을 기울임
0
A
답변
1
내가 정확히 질문에 대답 아니지만, 당신이 더 나은 선택이 될 SVG
을 찾을 수 있습니다 죄송합니다; 그것은 이런 종류의 물건을 위해 만들어졌고 죽기 쉽습니다.
<div class="background">
<svg>
<line x1="60%" y1="0" x2="40%" y2="100%" />
<line x1="70%" y1="0" x2="50%" y2="100%" />
<line x1="80%" y1="0" x2="60%" y2="100%" />
<line x1="90%" y1="0" x2="70%" y2="100%" />
<line x1="100%" y1="0" x2="80%" y2="100%" />
<line x1="110%" y1="0" x2="90%" y2="100%" />
</svg>
</div>
그리고 CSS는 다음과 같이이다 :
부모 DIV를 커버하는 배경으로 SVG를 설정하려면 ...
마크 업이 같다
.background {
position: relative;
width: 300px;
height: 400px;
border: 2px dashed black;
}
svg {
position: absolute;
width: 100%;
height: 100%;
background: #d7322c;
}
line {
stroke-width: 2;
stroke: #dc4e49;
}
+0
니스! 이것을 백그라운드로 설정할 수 있습니까? 이 DIV에 텍스트를 삽입해야합니다 –
+0
그래, 텍스트를 추가했습니다. https://jsbin.com/zokedi/5/edit?html,css,output –
0
예이, 을 할 수 있지만, 이것이 가장 좋은 방법
.ul-wrapper{
float: right;
margin: 0;
background: red;
width:100%;
}
li {
list-style-type: none;
border-bottom: 1px solid rgba(255,255,255,0.5);
line-height: 20px;
height: 23px;
transform: rotate(33deg);
}
<ul class="ul-wrapper">
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
0
없는 시도이 :
<style>
.parent {
height: 500px;
width: 400px;
background-color: red;
overflow: hidden;
}
.child {
background-color: transparent;
height: 200px;
width: 600px;
float: right;
margin-top: 100px;
-ms-transform: rotate(80deg);/* IE 9 */
-webkit-transform: rotate(80deg);/* Chrome, Safari, Opera */
transform: rotate(-60deg);
}
.line {
height: 25px;
display: block;
border-bottom: 1px solid white;
}
</style>
HTML
<div class="parent">
<div class="child">
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
<span class="line"></span>
</div>
</div>
0
html,
body {
height: 100%;
}
body {
margin: 0;
}
.box {
background: #d7322c;
position: relative;
overflow: hidden;
height: 100%;
}
.box:after {
background: repeating-linear-gradient(to right, transparent, transparent 21px, #e2716d 21px, #e2716d 22px);
transform: skewX(-5deg);
position: absolute;
content: '';
left: 120px;
z-index: 10;
bottom: 0;
right: 0;
top: 0;
}
<div class="box"></div>
관련 문제
- 1. CSS에서 단락을 기울이기 = 각 줄을 왼쪽으로 유지하십시오.
- 2. CSS에서 굵게 및 기울임 꼴을 결합하는 방법은 무엇입니까?
- 3. 기울임 꼴은 굵게 표시됩니까?
- 4. CSS에서 여러 글꼴을 사용하는 이유
- 5. CSS에서 이미지를 여러 번 요청했습니다
- 6. 외부 CSS에서 여러 글꼴 - 얼굴
- 7. 형식 기울임/
- 8. 여러 줄을 그리고 개별 줄을 삭제하십시오.
- 9. 캔버스로 여러 줄을 그립니다.
- 10. 여러 줄을 매크로에 전달
- 11. 여러 줄을 VTK로 설정
- 12. Graphics2D로 여러 줄을 그립니다.
- 13. 여러 줄을 확인하십시오
- 14. 여러 줄을 목록으로 변환합니다.
- 15. 여러 줄을 js로 대체하십시오
- 16. 파이썬에서 여러 줄을 그려보십시오.
- 17. CSS에서 텍스트 오버플로 사용
- 18. CSS에서 여러 링크 스타일을 사용할 수 있습니까?
- 19. CSS에서 @ font-face 규칙을 여러 개 사용하십시오.
- 20. CSS에서 부모가 같은 여러 자식 선택하기
- 21. 기울임 꼴 CSV 파일
- 22. DropDownList 값이 수직으로 기울임
- 23. 실제 컴퓨터 기울임 감지
- 24. Android 토스트 기울임 꼴
- 25. 기울임 꼴로 변수 유형
- 26. PropertyGrid의 기울임 꼴 텍스트
- 27. TinyMCE에 : 재정 굵은 기울임
- 28. 안드로이드 ListView를 기울임
- 29. SQL 여러 줄을 여러 번 곱하거나 선택하십시오.
- 30. 디렉토리의 여러 파일에 여러 줄을 추가하는 방법
왜 이미지 또는 svg를 가져 가지 않습니까? –
@IsmailFarooq이 줄을 사용하여 이미지를 사용할 수 있습니다 (SVG에서이 작업을 수행하는 방법을 알지 못합니다).하지만 DIV에서 커버 할 수 있습니까? –
div가 더 복잡 할 수도 있지만 가능하다. –