이 나는 가능한 한 깨끗한 방법을 달성하고 싶은 것입니다. 여기에서 Inuit.css
을 사용하고 있습니다.
꽤 간단해야하지만 패딩은 더욱 복잡합니다.
는 (나는 여기에 마크 업을 추가 할 관련라고 생각하지 않았다.)편집 :
내가 잘못했다. 여기 :
<div class="content content--work">
<div class="container--bigger">
<div class="grid">
<div class="grid__item one-half">
<div class="work-main">
<img src="img/work/timburton-1.svg" alt="">
</div>
</div>
<div class="grid__item one-half">
<div class="challenge">
<h3 class="work-title">The challenge</h3>
I needed to create a strong system.<br>
Something that would be good enough to generate 7 posters.
</div>
</div>
</div>
</div><!-- container bigger -->
절반
컨테이너 크기의 절반을 차지 인라인 블록이다. 배수로는 패딩으로 만들어집니다. (경계 박스)grid__item {
display: inline-block;
padding-left: 30px;
}
one-half {
width: 50%;
}
* 편집 2 : * 내가 this 함께했다
. 잘 작동하지 않습니다.
우리가 창 크기를 조정하면 그라디언트 사이의 경계가 교차 지점에 없습니다. 또한, 나는 그라디언트로 그것을 만들려고했는데, 내 생각에 잘 작동하지 않습니다. (고정 폭 대 %)이 여기에
는 CSS입니다 : (동일한 HTML) : 무엇보다
.challenge
background: #f4f0e5
padding-top: 20px
padding-bottom: 30px
vertical-align: top
padding: 20px
box-shadow: inset 5px 0 0 #9b9797
margin-bottom: 20px
.content--work
background: #423c3f
padding-top: 0
padding-bottom: 0
background: #423c3f /* Old browsers */
background: -moz-linear-gradient(left, #423c3f 0%, #423c3f 50%, #f7f5ea 50%, #f7f5ea 100%) /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,#423c3f), color-stop(51.1%,#423c3f), color-stop(51.1%,#f7f5ea), color-stop(100%,#f7f5ea)) /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, #423c3f 0%,#423c3f 50%,#f7f5ea 50%,#f7f5ea 100%) /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, #423c3f 0%,#423c3f 50%,#f7f5ea 50%,#f7f5ea 100%) /* Opera 11.10+ */
background: -ms-linear-gradient(left, #423c3f 0%,#423c3f 50%,#f7f5ea 50%,#f7f5ea 100%) /* IE10+ */
background: linear-gradient(to right, #423c3f 0%,#423c3f 50%,#f7f5ea 50%,#f7f5ea 100%) /* W3C */
.container--bigger
padding-top: 20px
background: image-url("work-separation.png") repeat-y 51.5% 60%
- , 그것은 다른 내가
두 번째 이미지에는 전체 페이지 높이와 너비가 포함되어 있지 않으므로 변경해야 할 내용을 말하기 어렵습니다. –
그래서 같은 높이의 열을 찾고 있습니까? – cimmanon
@ 코펜하겐 (Copenhagen) 내가 원하는 것은 두 가지 배경으로 나누어야한다는 것이다. (2 색) 나머지는 거의 같기 때문에 전체 페이지를 넣지 않았습니다. – Naemy