なんにもない日の頭の中はこんなもんだったりする

【CSS】シンプルなボタンデザイン実装サンプル集

  • 2019.8.26
【CSS】シンプルなボタンデザイン実装サンプル集

いろんなボタンをまとめました。

きのこさん
ボタンだー
きのこさん
ボタンでーす

1. しっかり企業系のボタン

BUTTON
HTMLとCSSはこちら

HTML

<section>
  <a href="#" class="btn_01">BUTTON</a>
</section>

CSS

section {
  max-width: 300px;
  margin: 0 auto;
}
a.btn_01 {
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(#4fb5ef, #0076b9 100%);
  border: 1px solid #005e94;
  border-radius: 12px;
  box-shadow: inset 0px 0px 2px 0px rgb(255, 255, 255);
  box-shadow: 0px 4px 4px 0px rgb(175, 175, 175);
  box-sizing: border-box;
  width: 100%;
  height: 50px;
  padding: 0 20px 0 70px;
  color: #fff;
  font-size: 16px;
  text-align: left;
  text-decoration: none;
  position: relative;
  transition-duration: 0.2s;
}
a.btn_01:hover {
  opacity: .7;
}
a.btn_01:before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 8px;
  border-color: transparent transparent transparent #ffffff;
  position: absolute;
  top: 50%;
  left: 23px;
  margin-top: -7px;
}
a.btn_01:after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 100%;
  background-color: #005e94;
  box-shadow: 0px 0px 2px 0px rgb(255, 255, 255);
  position: absolute;
  top: 0;
  left: 50px;
}

CodePenはこちら

2.シンプルな四角ボタン、左に三角

BUTTON
HTMLとCSSはこちら

HTML

<section>
  <a href="#" class="btn_02">BUTTON</a>
</section>

CSS

section {
  max-width: 300px;
  margin: 0 auto;
}
a.btn_02 {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border: 1px solid #228bc8;
  box-sizing: border-box;
  width: 100%;
  height: 50px;
  padding: 0 6% 0 12%;
  color: #228bc8;
  font-size: 16px;
  text-align: left;
  text-decoration: none;
  position: relative;
  transition-duration: 0.2s;
}
a.btn_02:hover {
  background: #228bc8;
  color: #fff;
}
a.btn_02:before {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 0 7px 8px;
  border-color: transparent transparent transparent #228bc8;
  position: absolute;
  top: 50%;
  left: 6%;
  margin-top: -7px;
}
a.btn_02:hover:before {
  border-color: transparent transparent transparent #fff;
}

CodePenはこちら

3.シンプルな角丸ボタン、右に矢印

BUTTON
HTMLとCSSはこちら

HTML

<section>
  <a href="#" class="btn_03">BUTTON</a>
</section>

CSS

section {
  max-width: 300px;
  margin: 0 auto;
}
a.btn_03 {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 50px;
  position: relative;
  background: #228bc8;
  border: 1px solid #228bc8;
  border-radius: 30px;
  box-sizing: border-box;
  padding: 0 45px 0 25px;
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  transition-duration: 0.3s;
}
a.btn_03:before {
  content: '';
  width: 8px;
  height: 8px;
  border: 0;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
  position: absolute;
  top: 50%;
  right: 25px;
  margin-top: -6px;
}
a.btn_03:hover {
  background: #fff;
  color: #228bc8;
}
a.btn_03:hover:before {
  border-top: 2px solid #228bc8;
  border-right: 2px solid #228bc8;
}

CodePenはこちら

4.シンプルな四角ボタン、左に矢印

BUTTON
HTMLとCSSはこちら

HTML

<section>
  <a href="#" class="btn_04">BUTTON</a>
</section>

CSS

section {
  max-width: 300px;
  margin: 0 auto;
}
a.btn_04 {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 50px;
  position: relative;
  background: #228bc8;
  border: 1px solid #228bc8;
  box-sizing: border-box;
  padding: 0 25px 0 40px;
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-align: left;
  text-decoration: none;
  transition-duration: 0.3s;
}
a.btn_04:before {
  content: '';
  width: 8px;
  height: 8px;
  border: 0;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
  position: absolute;
  top: 50%;
  left: 25px;
  margin-top: -6px;
}
a.btn_04:hover {
  background: #fff;
  color: #228bc8;
}
a.btn_04:hover:before {
  border-top: 2px solid #228bc8;
  border-right: 2px solid #228bc8;
}

CodePenはこちら

5.付箋のようなボタン

BUTTON
HTMLとCSSはこちら

HTML

<section>
  <a href="#" class="btn_05"><span>BUTTON</span></a>
</section>

CSS

section {
  max-width: 300px;
  margin: 0 auto;
}
a.btn_05 {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 70px;
  background-color: #e8a48b;
  box-sizing: border-box;
  color: #fff;
  font-size: 16px;
  letter-spacing: 0.1em;
  line-height: 2.0;
  text-decoration: none;
  transition-duration: 0.3s;
  position: relative;
}
a.btn_05:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 30px 40px 0 0;
  border-color: #ffffff transparent transparent transparent;
}
a.btn_05:after {
  content: "";
  position: absolute;
  top: -6px;
  left: 5px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 40px 30px;
  border-color: transparent transparent #efefef transparent;
  box-shadow: 1px 1px 1px 0px rgba(0, 0, 0, 0.15);
  transform: rotate(16deg);
}
a.btn_05:hover {
  background-color: #e6de6b;
}
a.btn_05 span {
  position: relative;
  padding-left: 16px;
  letter-spacing: 0.05em;
}
a.btn_05 span:before {
  content: '';
  width: 6px;
  height: 6px;
  border: 0;
  border-top: solid 2px #fff;
  border-right: solid 2px #fff;
  transform: rotate(45deg);
  position: absolute;
  top: 50%;
  left: 0;
  margin-top: -4px;
}

CodePenはこちら

6.立体的なボタン、押せるので楽しい

BUTTON
HTMLとCSSはこちら

HTML

<section>
  <a href="#" class="btn_06"><span>BUTTON</span></a>
</section>

CSS

section {
  max-width: 300px;
  margin: 0 auto;
}
a.btn_06 {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 50px;
  box-sizing: border-box;
  background: repeating-linear-gradient(45deg, #ffffff, #ffffff 3px, #e7e7e7 3px, #e7e7e7 30px);
  color: #333;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-decoration: none;
  position: relative;
}
a.btn_06 span {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 50px;
  background: #fff;
  border: 1px solid #000;
  box-sizing: border-box;
  position: absolute;
  top: -6px;
  left: -6px;
  transition-duration: 0.2s;
}
a.btn_06:hover span {
  left: -1px;
  top: -1px;
}

CodePenはこちら

7.右下に三角マークを置いてみたボタン

BUTTON
HTMLとCSSはこちら

HTML

<section>
  <a href="#" class="btn_07">BUTTON<span></span></a>
</section>

CSS

section {
  max-width: 300px;
  margin: 0 auto;
}
a.btn_07 {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  border: 1px solid #228bc8;
  box-sizing: border-box;
  width: 100%;
  height: 80px;
  padding: 0 25px;
  color: #228bc8;
  font-size: 16px;
  text-align: left;
  text-decoration: none;
  position: relative;
  transition-duration: 0.2s;
}
a.btn_07:hover {
  background: #228bc8;
  border: 1px solid #05639a;
  color: #fff;
}
a.btn_07:before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 40px 50px;
  border-color: transparent transparent #228bc8 transparent;
}
a.btn_07 span {
    position: absolute;
    bottom: 12px;
    right: 20px;
    display: inline-block;
}
a.btn_07 span:before {
    content: '';
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 0;
    margin-top: -8px;
}
a.btn_07 span:after {
    content: '';
    width: 6px;
    height: 6px;
    border: 0;
    border-top: 2px solid #228bc8;
    border-right: 2px solid #228bc8;
    transform: rotate(45deg);
    position: absolute;
    top: 50%;
    left: 4px;
    margin-top: -3px;
}

CodePenはこちら

さいごに

きのこさん
かわいいのがいいですねー
きのこさん
シンプルなのがいいですねー

Web design gallery - デザインのこと - ウェブデザインあつめました。
いつかのこと

おすすめ

Web design gallery - デザインのこと - ウェブデザインあつめました。

デザインの記事

女子美術大学・女子美術大学短期大学部
みんなでつくる HELLO! iDEA HELLO! New basic|studio CLIP
10月23日
とって/窓の家のかたち