2014-02-14 5 views
-1

테두리 아래 이미지 (화살표, 159px 너비)를 포함하고 싶습니다. 이처럼 다음 <li>는 159px의 폭을 얻을 수테두리 아래쪽과 메뉴 충돌

enter image description here

그러나 문제가있다.

enter image description here

국경 이미지를 표현하기 위해 어떤 트릭은 다른 <li> 밀어 않고있다?

LG 전자 cgee

<li>의 코드 :

.sub_menu ul li { 
    float: left; 
    font-family: 'Open Sans',sans-serif; 
    font-weight: bold; 
    height: 41px; 
    margin-right: 20px; 
    margin-top: 10px; 
} 

활성 요소의 코드 :

.sub_menu ul .active { 
    background-image: url("../images/sub_menu_border_active.png"); 
    background-position: center 17px; 
    background-repeat: no-repeat; 
    position: relative; 
    z-index: 100; 
} 

enter image description here

+0

당신은 당신의 문제를 재현하는 코드를 게시 할 필요하거나 질문은 폐쇄 얻을 것이다. – Archer

+0

나는 그것을했다.. 나는 세 번째 그림도 포함한다. – cgee

+0

CSS3 도형을 사용해 볼 수도 있습니다 ... –

답변

0

당신이 달성하기위한 몇 가지 가능성이 있습니다 원하는 결과 :

  1. li에 min-width: 159px을 추가 할 수 있습니다.
  2. li (예 : span)의 요소를 position: absolutebottom: 0과 함께 추가 할 수 있습니다. overflow: visibleli에 추가해야합니다. 다음은
  3. :

CSS는

.sub_menu ul .active { 
    position: relative; 
    z-index: 100; 
    overflow: visible; 
} 

.sub_menu ul .active:after { 
    content: ''; 
    background-image: url("../images/sub_menu_border_active.png"); 
    background-position: center 17px; 
    background-repeat: no-repeat; 
    position: absolute; 
    bottom: 0; 
    left: 50%; 
    margin-left: -80px; 
    height: ...; 
    width: 159px; 
    z-index: 101; 
} 
+0

1. 작동하지만 내 목표가 아닙니다./2. 작동하지 않습니까?! ... – cgee

+0

3 차 버전을 사용해보세요. –

+0

'

  • Google Analytics <스팬 클래스 = "sub_menu_arrow">
  • ' 클래스 : '.sub_menu_arrow { 배경 이미지 : URL ("../ 이미지/sub_menu_border_active .png "); 배경 위치 : 가운데 17px; 하단 : -4px; display : 블록; 신장 : 19px; 왼쪽 : 50 %; margin-left : -75px; 직위 : 절대; 너비 : 160px; }' – cgee

    관련 문제