다음 사이트를 만들려면 다음 블록을 만들어야합니다.CSS가있는 div 내의 이미지 배치
나는 아래의 HTML을 사용하는 경우 모서리가 둥근 흰색 상자와 그림자를 만들어 다음과 같은 CSS를 가지고있다.
<style type="text/css">
.stripeblock {
width: 310px;
border-radius: 12px;
background-color: #fff;
padding: 10px;
box-shadow: 0 8px 6px -6px black;
}
</style>
<div class="stripeblock">
<h1>Just some title</h1>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to...</p>
</div>
누락 된 유일한 것은 녹색 가로 줄무늬입니다. 몇 가지 시도했지만 올바르게 가져올 수 없습니다.
CSS를 통해 포함시키고 div 내에 별도의 요소가되지 않도록하고 싶습니다.
이것이 가능합니까?
합니까''h1'해야 h1' : 여기 결과, 밖으로
는확인? 이상하게 들릴지는 모르겠지만'inline' 요소를 사용했다면 녹색 요소의 너비가 제목 (고정되지 않음)만큼 길 수있는 경우에만 'border-top'을 만들 수 있습니다 – Moseleyi
아니요, 녹색 요소가 고정되어 있습니다 (115 x 5) – nhalink
H1에 이미지 배경을 추가하거나 이미지와 순수한 html + css를 사용하고 싶지 않으십니까? – Moseleyi