"CSS 머티리얼디자인 플로팅 버튼"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
3번째 줄: 3번째 줄:


==예시 1==
==예시 1==
<source lang='html' run outheight=300>
<syntaxhighlight lang='html' run outheight=300>
<style>
<style>
.btn-floating {
.btn-floating {
32번째 줄: 32번째 줄:
<br><br>
<br><br>
<a href='#' class='btn-floating'><div>-</div></a>
<a href='#' class='btn-floating'><div>-</div></a>
</source>
</syntaxhighlight>


==예시 2: 폰트어썸 활용==
==예시 2: 폰트어썸 활용==
<source lang='html' run outheight=300>
<syntaxhighlight lang='html' run outheight=300>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" />
<style>
<style>
67번째 줄: 67번째 줄:
<br><br>
<br><br>
<a href='#' class='btn-floating'><div><i class="fa fa-retweet"></i></div></a>
<a href='#' class='btn-floating'><div><i class="fa fa-retweet"></i></div></a>
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==

2021년 10월 15일 (금) 02:06 판

CSS material design floating button
CSS 머티리얼디자인 플로팅 버튼

1 예시 1

<style>
.btn-floating {
    color: #fff;
    padding: 0;
    width: 55.5px; height: 55.5px;
    display: inline-block;
    outline: 0;
    border: none;
    text-decoration: none;
    background: #2196F3;
    text-align: center;
    border-radius: 50%;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}
.btn-floating:hover {
    background: #42A5F5;
}
.btn-floating div {
    font-size: 1.8em;
    padding: 0;
    margin: .22em 0 0 0;
}
</style>
 
<br>
<a href='#' class='btn-floating'><div>+</div></a> 
<br><br>
<a href='#' class='btn-floating'><div>-</div></a>

2 예시 2: 폰트어썸 활용

<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" />
<style>
.btn-floating {
    color: #fff;
    padding: 0;
    width: 55.5px; height: 55.5px;
    display: inline-block;
    outline: 0;
    border: none;
    text-decoration: none;
    background: #2196F3;
    text-align: center;
    border-radius: 50%;
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12);
}
.btn-floating:hover {
    background: #42A5F5;
}
.btn-floating div {
    font-size: 1.8em;
    padding: 0;
    margin: .22em 0 0 0;
}
</style>
 
<br>
<a href='#' class='btn-floating'><div><i class="fa fa-pencil"></i></div></a>
<br><br>
<a href='#' class='btn-floating'><div><i class="fa fa-share"></i></div></a>
<br><br>
<a href='#' class='btn-floating'><div><i class="fa fa-retweet"></i></div></a>

3 같이 보기

4 참고

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