2016-10-04 4 views
-1

저는 CSS가 새로 생겨서 도움이 필요합니다 : - div에있는 일부 위치에서 세미 테두리를 이미지에 표시된대로 원합니다. 어떤 사람들이 그렇게하는 법을 말해 줄 수 있습니까?div 주위의 세미 테두리

Semi Border

+0

이 가능으로 표시 고려하시기 바랍니다 :) –

답변

4

당신은 당신은 용기 주위에 테두리를 적용하고 배경을 채울 수 <legend>

fieldset { 
 
    border-radius: 5px; 
 
}
<fieldset> 
 
    <legend>Contact:</legend> 
 
    Name:<input type="text"> 
 
    <br> 
 
    Email:<input type="text"> 
 
</fieldset>

4

아래의 예를 참조하십시오 <fieldset>과 HTML 요소를 사용 윤곽선이 c가되도록 텍스트의 이 같은 오프 유타 : 내 대답은 도움이 경우

<html> 
 
    <style> 
 
    #text { 
 
     position: absolute; 
 
     background: white; 
 
     top: -15px; 
 
     left: 10px; 
 
     padding: 5px; 
 
    } 
 
    #con { 
 
     margin: 20px; 
 
     width: 300px; 
 
     height: 500px; 
 
     position: relative; 
 
     border: 5px solid red; 
 
     border-radius: 5px; 
 
    } 
 
    </style> 
 
    <body> 
 
    <div id="con"> 
 
     <div id="text"> SEMI BORDER ? </div> 
 
    </div> 
 
    </body> 
 
</html>

관련 문제