메뉴 건너뛰기

HEUKMYO

Html/css

css basic li의 list style type

흑묘 2014.11.06 11:08 read.154

list-style-type의 속성에 사용될수 있는 값은 nond / disc / circle / square / decimal... 이 있습니다.

<!DOCTYPE html> 
<html>
    <head>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
          <title>List-style-type</title> 
          <style type="text/css">
              body {font-weight:bold;font-size:13px; font-family:"맑은 고딕","돋움",Dotum,sans-serif;}
              .none {list-style-type:none;}
              .disc {list-style-type:disc;}
              .circle {list-style-type:circle;}
              .square {list-style-type:square;}
              .decimal {list-style-type:decimal;}
         </style>
    </head>
 
 
 
   <body>
         <h3>List-style-type</h3>
           <p> none
             <ul class="none">
                <li>Menu1</li>
                <li>Menu2</li>
                <li>Menu3</li>
            </ul>
         </p>
         <p> disc
            <ul class="disc">
               <li>Menu1</li>
               <li>Menu2</li>
               <li>Menu3</li>
            </ul>
         </p>
         <p> circle
             <ul class="circle">
                 <li>Menu1</li>
                 <li>Menu2</li>
                 <li>Menu3</li>
              </ul>
         </p>
          <p> square
               <ul class="square">
                   <li>Menu1</li>
                   <li>Menu2</li>
                   <li>Menu3</li>
               </ul>
           </p>
           <p> decimal
                <ul class="decimal">
                     <li>Menu1</li>
                     <li>Menu2</li>
                     <li>Menu3</li>
                </ul>
          </p>
    </body>
</html>

 

 

<결과보기>

daum.jpg

 

list-style-position : 목록 마커의 위치 지정

list-style-position : inside - 목록 안쪽

list-style-position : outside - 목록 바깥쪽

<!DOCTYPE html> 
<html>
    <head>
          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
          <title>list-style-position</title> 
          <style type="text/css">
               body {font-weight:bold;font-size:13px; font-family:"맑은 고딕","돋움",Dotum,sans-serif;}
               li {background-color:yellow;} /*위치를 확인하기 위해 백그라운드 지정 */
               .inside {list-style-position : inside;} 
               .outside {list-style-position : outside;} 

         </style>
   </head>
 
 
 
   <body>
        <h3>list-style-position</h3>
          <p> position : inside
            <ul class="inside">
                    <li>Menu1</li>
                    <li>Menu2</li>
                    <li>Menu3</li>
            </ul>
          </p>
 
 
          <p> position : outside
            <ul class="outside">
                     <li>Menu1</li>
                     <li>Menu2</li>
                     <li>Menu3</li>
            </ul>
          </p>
    </body>
</html>

 

[CSS]list-style-positionCSS / 공부해서 남주자

2013/11/06 22:41

복사http://blog.naver.com/ttb0704/80201228541

전용뷰어 보기

list-style-position : 목록 마커의 위치 지정

list-style-position : inside - 목록 안쪽

list-style-position : outside - 목록 바깥쪽

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>list-style-position</title>
<style type="text/css">
body {font-weight:bold;font-size:13px; font-family:"맑은 고딕","돋움",Dotum,sans-serif;}
li {background-color:yellow;} /*위치를 확인하기 위해 백그라운드 지정 */
.inside {list-style-position : inside;}
.outside {list-style-position : outside;}

</style>
</head>

<body>
<h3>list-style-position</h3>
<p> position : inside
<ul class="inside">
<li>Menu1</li>
<li>Menu2</li>
<li>Menu3</li>
</ul>
</p>

<p> position : outside
<ul class="outside">
<li>Menu1</li>
<li>Menu2</li>
<li>Menu3</li>
</ul>
</p>
</body>
</html>

<결과보기>

daum1.jpg

 

 

 

 

 

 

위로