나는이 디자인 달성하기 위해 함께 플레이하는 두 개의 선택기가 : 나는 거의 모든 시도이미지와 같은 요소를 CSS로 배치하려면 어떻게해야합니까?
을하지만 난 그냥 문이 안 열려 큰 글자 바로 옆에 떠있는 텍스트를 얻을 수가
여기HTML :
코드입니다<div class="processlinks-section-template">
<div class="processlinks-section-item" data-letter="H">
<div class="processlinks-section-item-title">
<a href="http://aftonbladet.se">Haftonbladet.se</a>
</div>
<div class="processlinks-section-item-title">
<a href="http://teabagz.com">Hteabagz.com</a>
</div>
</div>
<div class="processlinks-section-item" data-letter="C">
<div class="processlinks-section-item-title">
<a href="http://Cftonbladet.se">Cftonbladet.se</a>
</div>
<div class="processlinks-section-item-title">
<a href="http://Cteabagz.com">Cteabagz.com</a>
</div>
</div>
</div>
CSS : 도움의 모든 종류의
참고 감사
[data-letter] {
margin:7px;
background:#ef8;
}
[data-letter]:before {
content:attr(data-letter);
font-size:36px;
margin:7px;
}
.processlinks-section-template
{
width: 270px;
height: 100%;
}
}
.processlinks-section-item-title
{
margin-top:5px;
}
.processlinks-section-item-title a
{
color:black;
}
.processlinks-section-item-title a:visited
{
color:black;
}
.processlinks-section-item-title a:hover
{
color:#0084c9;
}
: 나는 오히려 단지이 두 선택기와 함께 머물 수 있도록 물건을 추가 자바 스크립트가 있습니다.
하나의 항목이있는 경우 디자인을 망칠 것으로 보이며 나는 그 문제라고 생각합니다. jsbin.com/UHiZUJU/9/edit
큰 설명 주셔서 감사합니다! 문제는 디자인이 엉망이 된 1 가지 항목이 있다면보십시오 : http://jsbin.com/UHiZUJU/9/edit. 또한 각 섹션의 1-8 개 항목까지 모두 가능합니다. 내 링크에서 볼 수있는 이유는 내가 디자인을 달성 할 수없는 이유라고 생각한다. – Obsivus
내용이 psuedo-element보다 짧으면 컨테이너에 clearfix를 추가해야한다. '.processlinks-section-item' 컨테이너 클래스에'overflow : hidden'을 추가하십시오 : [Updated JSBin] (http://jsbin.com/UHiZUJU/16/) – Ennui
당신은 원한다면 ': before'''psuedo '요소를 사용하여 선행 문자/문자가 같은 너비가 아닌 경우에도 깔끔하게 보입니다. "clearfix"트릭의 다른 많은 메소드도 있지만'overflow : hidden'은이 컨텍스트에서 가장 간단합니다. – Ennui