イセンチュートリアルサイト
  • CSS
    • スクロールダウン
    • テキストナビゲーション
    • ボタン
    • メニュー
    • 動画
    • 検索
    • 画像リンクの動き
    • 背景の動き
  • Illustrator
  • JS
    • アコーディオンパネル
    • アニメーション
    • エリアの動き
    • ギャラリー
    • グラフ
    • スライド
    • テキストの動き
    • ニュースティッカー
    • ページトップリンク
    • ページ内リンク
    • メニュー
    • モーダルウィンドウ
    • ローディング
  • Photoshop
  • PHP
  • WordPress
    • プラグイン
    • リンク
  • お客様観覧用
    • WEB制作プラン
    • アニメーション
    • グローバルナビゲーション
    • スライド
  • サーバー
    • CPI
  • 未分類
  • 法律
    • 医療法
    • 柔道整復師法
TOP CSS ボタン 基本的なborderや影を使ったボタン

CSS

基本的なborderや影を使ったボタン

  • カテゴリー:ボタン

    基本ベースCSS

    /* まずはお決まりのボックスサイズ算出をborer-boxに */
    /* すべてのボタンデザインに共通しているわけではありません。不必要なものは消してください。 */
    
    *,
    *:before,
    *:after {
    	-webkit-box-sizing: inherit;
    	box-sizing: inherit;
    }
    
    html {
    	-webkit-box-sizing: border-box;
    	box-sizing: border-box;
    	font-size: 62.5%;/*rem算出をしやすくするために*/
    }
    
    .btn,
    a.btn,
    button.btn {
    	font-size: 1.6rem;
    	font-weight: 700;
    	line-height: 1.5;
    	position: relative;
    	display: inline-block;
    	padding: 1rem 4rem;
    	cursor: pointer;
    	-webkit-user-select: none;
    	-moz-user-select: none;
    	-ms-user-select: none;
    	user-select: none;
    	-webkit-transition: all 0.3s;
    	transition: all 0.3s;
    	text-align: center;
    	vertical-align: middle;
    	text-decoration: none;
    	letter-spacing: 0.1em;
    	color: #212529;
    	border-radius: 0.5rem;
    }
    

     

    • 立体

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--yellow btn--cubic">PUSH!</a>

       

      CSS

      a.btn--yellow {
      	color: #000;
      	background-color: #fff100;
      	border-bottom: 5px solid #ccc100;
      }
      
      a.btn--yellow:hover {
      	margin-top: 3px;
      	color: #000;
      	background: # fff20a;
      	border-bottom: 2px solid #ccc100;
      }
      

       

    • 立体 / 影

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--orange btn--cubic btn--shadow">PUSH!</a>

       

      CSS

      a.btn--orange {
      	color: #fff;
      	background-color: #eb6100;
      	border-bottom: 5px solid #b84c00;
      }
      
      a.btn--orange:hover {
      	margin-top: 3px;
      	color: #fff;
      	background: #f56500;
      	border-bottom: 2px solid #b84c00;
      }
      
      a.btn--shadow {
      	-webkit-box-shadow: 0 3px 5px rgba(0, 0, 0, .3);
      	box-shadow: 0 3px 5px rgba(0, 0, 0, .3);
      }
      

       

    • 立体 / エンボス

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--blue btn--emboss btn--cubic">PUSH!</a>

       

      CSS

      a.btn--blue {
      	color: #fff;
      	background: #00bff8;
      	border-bottom: 5px solid #0090bb;
      }
      
      a.btn--blue:hover {
      	margin-top: 3px;
      	color: #0090bb;
      	background: #00bff8;
      	border-bottom: 2px solid #0090bb;
      }
      
      a.btn--emboss {
      	color: #0090bb;
      	text-shadow: -1px -1px 1px #55d8ff;
      }
      

       

    • 立体 / エンボス / アイコン

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--green btn--emboss btn--cubic">PUSH!<i class="fas fa-angle-right fa-position-right"></i></a>

       

      CSS

      a.btn--green.btn--emboss {
      	color: #00662d;
      	background-color: #094;
      	text-shadow: -1px -1px 1px #00ff71;
      	border-bottom: 5px solid #00662d;
      }
      
      a.btn--green.btn--cubic:hover {
      	margin-top: 3px;
      	background-color: #094;
      	border-bottom: 2px solid #00662d;
      }
      
      .fa-position-right {
      	position: absolute;
      	top: calc(50% - .5em);
      	right: 1rem;
      }
      

       

    • 立体 / 浮き出し / アイコン

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--pink btn--raised btn--cubic">PUSH!<i class="fas fa-angle-right fa-position-right"></i></a>

       

      CSS

      a.btn--raised {
      	color: #eb6877;
      	text-shadow: -1px -1px 1px rgba(255, 255, 255, .44), 1px 1px 1px #4a0a11;
      }
      
      .btn--pink,
      a.btn--pink,
      button.btn--pink {
      	color: #fff;
      	background-color: #eb6877;
      }
      
      .btn--pink.btn--cubic,
      a.btn--pink.btn--cubic,
      button.btn--pink.btn--cubic {
      	border-bottom: 5px solid #e53b4e;
      }
      
      a.btn--pink.btn--cubic:hover {
      	margin-top: 3px;
      	background-color: #eb6877;
      	border-bottom: 2px solid #e53b4e;
      }
      

       

    • 立体 / 角丸大 / アイコン

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--red btn--radius btn--cubic">PUSH!<i class="fas fa-angle-right fa-position-right"></i></a>

       

      CSS

      .btn--red,
      a.btn--red {
      	color: #fff;
      	background-color: #d20010;
      }
      
      .btn--red:hover,
      a.btn--red:hover {
      	color: #fff;
      	background: #d20010;
      }
      
      a.btn--red.btn--cubic {
      	border-bottom: 5px solid #9f000c;
      }
      
      a.btn--red.btn--cubic:hover {
      	margin-top: 3px;
      	border-bottom: 2px solid #9f000c;
      }
      
      a.btn--radius {
      	border-radius: 100vh;
      }
      
      .fa-position-right {
      	position: absolute;
      	top: calc(50% - .5em);
      	right: 1rem;
      }
      

       

    • 立体 / 角丸大 / 複数アイコン

       

      PUSH
       

      HTML

      <a href="" class="btn btn--purple btn--radius btn--cubic"><i class="fas fa-angle-double-right fa-position-left"></i>PUSH<i class="fas fa-angle-double-left fa-position-right"></i></a>

       

      CSS

      .btn--purple,
      a.btn--purple {
      	color: inherit;
      	color: #fff;
      	background-color: #5f52a0;
      }
      
      .btn--purple:hover,
      a.btn--purple:hover {
      	color: inherit;
      	color: #fff;
      	background: #5f52a0;
      }
      
      a.btn--purple.btn--cubic {
      	border-bottom: 5px solid #4b417e;
      }
      
      a.btn--purple.btn--cubic:hover {
      	margin-top: 3px;
      	border-bottom: 2px solid #4b417e;
      }
      
      .fa-position-left {
      	position: absolute;
      	top: calc(50% - .5em);
      	left: 1rem;
      }
      
      .fa-position-right {
      	position: absolute;
      	top: calc(50% - .5em);
      	right: 1rem;
      }
      

       

    • 枠線

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--orange btn--border-solid">PUSH!</a>

       

      CSS

      .btn--orange,
      a.btn--orange {
      	color: #fff;
      	background-color: #eb6100;
      }
      
      .btn--orange:hover,
      a.btn--orange:hover {
      	color: #fff;
      	background: #f56500;
      }
      
      a.btn--orange.btn--border-solid {
      	border: 2px solid #b84c00;
      }
      

       

    • 二重線

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--blue btn--border-double">PUSH!</a>

       

      CSS

      a.btn--blue {
      	color: #fff;
      	background: #00bff8;
      	border-bottom: 5px solid #0090bb;
      }
      
      a.btn--blue:hover {
      	margin-top: 3px;
      	color: #0090bb;
      	background: #00bff8;
      	border-bottom: 2px solid #0090bb;
      }
      
      a.btn--blue.btn--border-double {
      	border: 8px double #0090bb;
      }
      

       

    • くぼみ線

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--green btn--border-groove">PUSH!</a>

       

      CSS

      .btn--green,
      a.btn--green,
      button.btn--green {
      	color: #fff;
      	background-color: #094;
      }
      
      a.btn--green.btn--border-groove {
      	border: 6px groove #008039;
      }
      

       

    • 浮き出し線

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--pink btn--border-ridge">PUSH!</a>

       

      CSS

      .btn--pink, a.btn--pink, button.btn--pink {
      	color: #fff;
      	background-color: #eb6877;
      }
      
      a.btn--pink.btn--border-ridge {
      	border: 6px ridge #e53b4e;
      }
      

       

    • くぼみ

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--red btn--border-inset">PUSH!</a>

       

      CSS

      .btn--red, #sidebar .category .category-inner .posted-content .customer a.btn--red {
      	color: #fff;
      	background-color: #d20010;
      }
      
      a.btn--red.btn--border-inset {
      	border: 6px inset #b9000e;
      }
      

       

    • 浮き出し

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--red btn--border-outset">PUSH!</a>

       

      CSS

      .btn--red, #sidebar .category .category-inner .posted-content .customer a.btn--red {
      	color: #fff;
      	background-color: #d20010;
      }
      
      a.btn--red.btn--border-outset {
      	border: 6px outset #b9000e;
      }
      

       

    • 破線

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--yellow btn--border-dashed">PUSH!</a>

       

      CSS

      a.btn--yellow {
      	color: #000;
      	background-color: #fff100;
      }
      
      a.btn--yellow.btn--border-dashed {
      	border: 2px dashed #000;
      }
      

       

    • 点線

       

      PUSH!
       

      HTML

      <a href="" class="btn btn--yellow btn--border-dotted">PUSH!</a>

       

      CSS

      .btn--pink, a.btn--pink, button.btn--pink {
      	color: #fff;
      	background-color: #eb6877;
      }
      
      a.btn--yellow.btn--border-dotted {
      	border: 3px dotted #000;
      }
      

       

    • 線 & 立体的に

       

      PUSH
       

      HTML

      <a class="btn btn-custom01"><span class="btn-custom01-front">PUSH</span><i class="fas fa-angle-right fa-position-right"></i></a>

       

      CSS

      a.btn-custom01 {
      	margin-bottom: 0.5rem;
      	padding: 0;
      	border-radius: 0.75rem;
      }
      
      a.btn-custom01:before {
      	position: absolute;
      	top: 0;
      	right: 0;
      	bottom: 0;
      	left: 0;
      
      	width: 100%;
      	height: 100%;
      
      	content: "";
      	-webkit-transition: all 0.3s;
      	transition: all 0.3s;
      	-webkit-transform: translate3d(0, 0.75rem, -1rem);
      	transform: translate3d(0, 0.75rem, -1rem);
      
      	border: 2px solid #000;
      	border-radius: inherit;
      	background: #ccc100;
      	-webkit-box-shadow: 0 0.6rem 0 0 rgba(0, 0, 0, 0.2);
      	box-shadow: 0 0.6rem 0 0 rgba(0, 0, 0, 0.2);
      }
      
      a.btn-custom01:after {
      	font-family: "Font Awesome 5 Free";
      	font-size: 2rem;
      	font-weight: normal;
      	line-height: 1;
      	position: absolute;
      	top: calc(50% - 1rem);
      	left: 1.5rem;
      	margin: 0;
      	padding: 0;
      	content: "\f0e0";
      }
      
      .btn-custom01-front {
      	position: relative;
      	display: block;
      	padding: 1.5rem 5rem 1.5rem 5rem;
      
      	-webkit-transition: all 0.3s;
      	transition: all 0.3s;
      	border: 2px solid #000;
      	border-radius: inherit;
      	background: #fff100;
      }
      
      .fa-position-left {
      	position: absolute;
      	top: calc(50% - 0.5em);
      	left: 1rem;
      }
      
      .fa-position-right {
      	position: absolute;
      	top: calc(50% - 0.5em);
      	right: 1rem;
      }
      
      a.btn-custom01:hover {
      	-webkit-transform: translate(0, 0.25rem);
      	transform: translate(0, 0.25rem);
      	background: #fff100;
      }
      
      a.btn-custom01:hover:before {
      	-webkit-transform: translate3d(0, 0.5rem, -1rem);
      	transform: translate3d(0, 0.5rem, -1rem);
      	-webkit-box-shadow: 0 0.35rem 0 0 rgba(0, 0, 0, 0.2);
      	box-shadow: 0 0.35rem 0 0 rgba(0, 0, 0, 0.2);
      }
      
      a.btn-custom01:hover:after {
      	content: "\f2b6";
      }
      

       

    投稿日:2022年11月11日
次のページ
前のページ

アーカイブ

  • CSS (117)
    • スクロールダウン (8)
    • テキストナビゲーション (11)
    • ボタン (52)
    • メニュー (1)
    • 動画 (2)
    • 検索 (3)
    • 画像リンクの動き (23)
    • 背景の動き (17)
  • Illustrator (8)
  • JS (93)
    • アコーディオンパネル (2)
    • アニメーション (1)
    • エリアの動き (7)
    • ギャラリー (6)
    • グラフ (7)
    • スライド (9)
    • テキストの動き (17)
    • ニュースティッカー (1)
    • ページトップリンク (9)
    • ページ内リンク (2)
    • メニュー (28)
    • モーダルウィンドウ (1)
    • ローディング (3)
  • Photoshop (1)
  • PHP (20)
  • WordPress (4)
    • プラグイン (2)
    • リンク (1)
  • お客様観覧用 (11)
    • WEB制作プラン (1)
    • アニメーション (8)
    • グローバルナビゲーション (1)
    • スライド (1)
  • サーバー (6)
    • CPI (1)
  • 未分類 (6)
  • 法律 (2)
    • 医療法 (1)
    • 柔道整復師法 (1)
TOP
  • CSS
    • スクロールダウン
    • テキストナビゲーション
    • ボタン
    • メニュー
    • 動画
    • 検索
    • 画像リンクの動き
    • 背景の動き
  • Illustrator
  • JS
    • アコーディオンパネル
    • アニメーション
    • エリアの動き
    • ギャラリー
    • グラフ
    • スライド
    • テキストの動き
    • ニュースティッカー
    • ページトップリンク
    • ページ内リンク
    • メニュー
    • モーダルウィンドウ
    • ローディング
  • Photoshop
  • PHP
  • WordPress
    • プラグイン
    • リンク
  • お客様観覧用
    • WEB制作プラン
    • アニメーション
    • グローバルナビゲーション
    • スライド
  • サーバー
    • CPI
  • 未分類
  • 法律
    • 医療法
    • 柔道整復師法
© 2022 isen-print.