Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <a href="#" class="prev">prev</a>
	<a href="#" class="next">next</a>
<div class="box">
	<ul class="list">
<div class="box2"> 
	<ul class="list2">
		<li><img src="" width="100" height="70" alt="1" /></li>
		<li><img src="" width="100" height="70" alt="2" /></li>
		<li><img src="" width="100" height="70" alt="3" /></li>
		<li><img src="" width="100" height="70" alt="4" /></li>
		<li><img src="" width="100" height="70" alt="5" /></li>
		<li><img src="" alt="6" /></li>    


                .box{height:70px;width:300px;border:4px solid red;margin-left:100px;/* overflow:hidden; */}
.list li{float:left;list-style:none;margin:0;padding:0;position:relative;width:100px;text-align:center;line-height:70px;} 
.list2 {margin-left:65px}
.list2 li{float:left;}


	var wd = $(".list li").width();
  var bb = $(".box").width();
	var max = wd * $(".list li").size();
  $(".list li:lt(6)").appendTo(".list")
  //$(".list li:gt(2)").prependTo(".list") // .list 에서 0부터 2 이후의 값을 찾아 .list의 앞에 붙여준다.
	//$(".list").css("margin-left",-bb) //.list에서 마진값으로 박스 넓이만큼 왼쪽으로 밀어줘서 앞에 붙여진 항목들을 숨겨준다.
  //$(".list li:lt(3)").appendTo(".list"); // 4번째 이전의 항목을 list 뒤에 추가한다.
  //$(".list li:gt(3)").appendTo(".list");
  //$(".list li:last").append(".list li:lt(3)");
			marginLeft : parseInt($(".list").css("margin-left"))-bb+"px"
      //$(".list li:gt(2)").appendTo(".list");
			$(".list li:lt(3)").appendTo(".list")
		return false;

			marginLeft : parseInt($(".list").css("margin-left"))+bb+"px"
      /* 9개일 경우 */
      $(".list li:gt(5)").prependTo(".list") //2이하일 경우 list 앞에 붙여준다.
      6개일 경우
      //$(".list li:gt(2)").prependTo(".list")
		return false;