Skip to content

Instantly share code, notes, and snippets.

@yuririn
Last active June 15, 2018 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuririn/0247018e15e62f0f769d918f8a1e525d to your computer and use it in GitHub Desktop.
Save yuririn/0247018e15e62f0f769d918f8a1e525d to your computer and use it in GitHub Desktop.
btn-css1
// 押したらくぼむ
.press {
transition: .3s;
border-radius: 5px;
background: linear-gradient(to bottom, #ffa670 0%, #fc5800 65%);
text-decoration: none;
padding: 15px 30px;
display: inline-block;
color: #ffffff;
text-shadow: 1px 1px 1px #912C1D;
box-shadow: 0 3px #C94528;
}
.press:hover {
background: linear-gradient(to bottom,#fc5800 0%, #fc5800 65%);
}
// ホバーしたら破線で囲う
.dashed {
background: #333;
color: #fff;
border: 1px solid #333;
padding: 14px 30px;
}
.dashed:hover {
background: #fff;
border: 1px solid orangered;
border-style:dashed;
border-radius: 30px;
color: orangered;
}
// 括弧で囲う
.bracekts {
background: #fff;
color:#333 ;
position: relative;
font-weight: bold;
padding: 15px 25px;
display: inline-block;
text-align: center;
transition: .3s;
}
.bracekts::before {
top: 0;
left: 0;
border-left: 2px solid #333;
border-top: 2px solid #333;
transition: .3s;
}
.bracekts::after {
bottom: 0;
right: 0;
border-right: 2px solid #333;
border-bottom: 2px solid #333;
transition: .3s;
}
.bracekts::after,
.bracekts::before {
position: absolute;
display: block;
content: '';
width: 100%;
height: 100%;
}
.bracekts:hover {
color: rgb(42, 148, 190);
}
.bracekts:active {
opacity: .5;
}
.bracekts:hover::after,.bracekts:hover::before {
width: 30px;
height: 20px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment