Subscribed unsubscribe Subscribe Subscribe

CHROMA

Web Designer の頭から飛び出たアイデアの記録

Border Radius Tab

Dev

f:id:thleap:20130426181316p:plain

jsdo.it

今こんな感じでタブ作ってる。

Code

html

<ul class="shift_box">
  <li class="current"><a href="">タブだよ</a></li>
  <li><a href="">タブだよ</a></li>
</ul>
<div class="contents">
  <h2>タイトルだよ</h2>
</div>

css

* {
  margin: 0;
  padding: 0;
  border: 0;
}

body {
  background: #fff;
  font: 30px sans-serif;
  padding: 40px;
}

ul {
    list-style: none;
}

.contents {
  padding: 12px 20px;
  border: 4px solid #d9d8d6;
  border-radius: 4px;
  background-color: white;
  margin-bottom: 20px;
}

h2 {
  background: none;
  border-left: 6px solid #E7BE00;
  border-radius: 0;
  color: #3F2500;
  font-size: 18px;
  line-height: 22px;
  padding: 0 0 0 10px;
}

.shift_box {
  margin-bottom: -4px;
  overflow: hidden;
}

.shift_box .current {
  background: #fff;
  border-top: 4px solid #d9d8d6;
  border-right: 4px solid #d9d8d6;
  border-left: 4px solid #d9d8d6;
}

.shift_box .current a {
  width: 160px;
  border-bottom: 4px solid #fff;
}

.shift_box li {
  background: #d9d8d6;
  border: 4px solid #d9d8d6;
  border-radius: 4px 4px 0 0;
  float: left;
  margin: 0 8px 0 0;
  text-align: center;
  width: 160px;
}

.shift_box li a {
  color: #4C2C00;
  font-size: 16px;
  font-weight: bold;
  padding: 9px 48px;
  text-decoration: none;
}