Less 시작하기

Jmnote bot (토론 | 기여)님의 2020년 11월 2일 (월) 02:54 판 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
LESS 시작하기
LESS 튜토리얼

1 예시[ | ]

first.less
.rounded-corners (@radius: 5px) {
  border-radius: @radius;
  -webkit-border-radius: @radius;
  -moz-border-radius: @radius;
}

@mycolor: #abcdef;

div { 
  width: 100px; height: 100px;
  background-color: @mycolor;
  margin: 10px;
}
#box1 { .rounded-corners; }
#box2 { .rounded-corners(35px); }
first.php
<link rel="stylesheet/less" type="text/css" href="first.less">
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.1.0/less.min.js"></script>
<div id='box1'>box1</div>
<div id='box2'>box2</div>
http://zetawiki.com/ex/less/first.php

2 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}