나는 퍼센트 레이아웃으로 작업 한 적이 없습니다. 물론, 나는 이미 그들을 연구하지만, 어떤 연습도하지 않고. 따라서 레이아웃의 스크린 샷을보고 모두에게 다음과 같이 말합니다. 동일한 레이아웃을 다른 비율의 조건으로 표시하고 마지막으로 레이아웃 품질을 잃지 않고 어떻게 표시 할 수 있습니까? div의 중첩 및 공백없이 동적 너비 백분율로 작업
당신이 볼 수 있듯이
, 내 레이아웃은 'OK r에. 그러나 1024x768에서는 약간의 간격이 있습니다. 반면에 1920x1080에서는 레이어 사이의 공간을 초과했습니다. 나는 이것을하기 위해 CSS를 사용하고있다. 봐 :
section#FeedDeck {
width: 100%;
height: 100%;
float: left;
}
.FeedContainer {
width: 100%;
float: left;
padding-bottom: 25px;
border-bottom: 1px solid #b9b9b9;
}
.LeftFeedSide {
width: 10%;
float: left;
}
.CenterFeedSide {
width: 80%;
float: left;
}
.RightFeedSide {
width: 10%;
float: right;
text-align: right;
font-size: 12px;
}
.RightFeedSide a {
width: 100%;
float: left;
}
내 HTML :
<section id="FeedDeck">
<div class="FeedContainer">
<div class="LeftFeedSide">
<img src="60x60.jpg" alt="" />
</div>
<div class="CenterFeedSide">
<header id="FeedContent">
<h1>Anne Hathaway</h1>
<h4>Diretora de Design</h4>
</header>
<p>
Can you fix a broken drug company research lab?
</p>
<p>
Jack Scannell, the European pharmaceuticals analyst at
Sanford C. Bernstein, recently held a conference on the future
of drug research and development. On the last day, he had representatives
from two of the most successful drug development organizations on the planet:
Sean Bohen, who heads early resaerch and development at Genentech, part of Roche,
which has had a legendary string of cancer drug successes; and Mads Krogsgaard Thomsen,
the chief scientific officer at Novo Nordisk, one of the dominant players in diabetes and
the best-performing big pharma stock over the past decade. This story is based on a transcript
of their talks.
</p>
</div>
<div class="RightFeedSide">
<a href="#">#1</a>
<span>há um minuto atrás</span>
</div>
</div>
</section>
jsfiddle을 생성하십시오. 그게 훨씬 더 간단하게 도움이 될 것입니다. –
__ 원하는 간격 _ 또는 _more spacing_? 내 말은 너에게 맞는 말이야? – Asif
@AaronDigulla : 원하는대로. 잠시만 기다려. + Asif : 내 레이어 사이에 같은 간격이 필요합니다. 픽셀로이 작업을 수행 할 수는 있지만 사용할 수는 없습니다. 내가 원하는 올바른 방법은 1024x768 픽셀 해상도입니다. –