티스토리 뷰
Design a Button for Your Website
Coding in Style
1. What you’ll be building
You've probably seen all kinds of nifty-looking buttons on your favorite websites that link you to different webpages. In this project, we'll show you how to make your own!
2. Drawing your button
Let's get started! First things first: we'll need to create our button. We'll do this with<div></div> tags.
3. Shaping your button
This involves a new property called border-radius.
4. Positioning your button
margin: auto; is the CSS you use to tell the browser: "Hey! Make sure to set equal margins on each side of this HTML element." When the margins are equal, the object is centered.
text-align: center; is how you center text elements
5. Adding the link
Now we want to add a link with text to our button.
On the HTML tab:
Add a link (using <a></a> tags) between your <div></div> tags. You can set its href attribute to go to any website, and you can make the link text itself say whatever you want!
On the CSS tab:
Set your link's text-decoration to none. Give it whatever color or font-family you like!
6. It’s alive!
In just a few short steps, you've made a functioning button that will send your website's visitors wherever you'd like them to go.
Feel free to go ahead and play with the settings on your button, such as changing its colors, the font size, or the border-radiusvalue.
- Total
- Today
- Yesterday
- 한화오션
- 해운주
- 코스피
- 로봇관련주
- 국제유가
- 삼성전자
- 호르무즈해협
- 반도체관련주
- ruby
- Rails
- 알고리즘
- 지정학적리스크
- 주식투자
- 현대차
- 개인투자자
- 한국항공우주
- 이펙티브 자바
- AI반도체
- 투자전략
- 주가전망
- 한화에어로스페이스
- 엔비디아
- 한미반도체
- 자료구조
- SK하이닉스
- HBM
- ruby on rails
- 방산주
- 원달러환율
- Java
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |