アミアンインターナショナル

貴社の売り上げアップをとことん支援します。オンラインショップ専門コンサルタント

CMS css コンテンツ 新着情報

問い合わせボタンの設置 ⇒ トップページの作り込み4

投稿日:2019年5月16日 更新日:

Call to Action

ネットショップで最も大切なのは、Call to Actionだ。

CTA とは 意味/解説/説明 (シーティーエー) 【Call To Action,コールトゥアクション】 | Web担当者ForumCTAは「Call To Action」の略。日本語の意味としては「行動喚起」といったところ。

Webサイトで訪問者を、とってもらいたい行動に誘導することを意味し、多くの場合はボタンやリンクの形で表示される。

CTA とは 意味/解説/説明 (シーティーエー) 【Call To Action,コールトゥアクション】 | Web担当者Forumから引用

買ってもらわないと、意味がない。

通常は「カートに入れる」ボタンなのだが、今回このブログでのCall to Actionは「お問い合わせ」と言うことにした。

cssボタン

お問い合わせボタンだが、自分でデザインするのもアレなので、こちらのものを使わせてもらった。

コンバージョン(CV)ボタンをCSSで装飾・アニメーションさせる方法を紹介!(アフィリエイトリンクをボタンに) | ザ・サイベース今でも時々テキストリンクも使っているんですが、CSSで装飾したコンバージョンボタンを使うことが多くなっています。

そもそも、ボタンだと認識してもらえなかったり、目立たないことでクリックされる機会を逃してしまうとしたら、ものすごくもったいないですよね。

今回の記事では、コンバージョンボタンの作り方を、HTMLやCSSのソースとともに紹介してみます!

コンバージョン(CV)ボタンをCSSで装飾・アニメーションさせる方法を紹介!(アフィリエイトリンクをボタンに) | ザ・サイベースから引用

HTMLを追加。

<div class="btn-cv is-reflection is-trembling">
  <a href="https://amiens.jp/ajaxmail/">今すぐお問い合わせください</a></div>

cssは、少し変更した。

  • 黒背景にする
  • 幅を最大600pxにする
  • スマホ対応の所の挙動を調整
/*
* コンバージョンボタン
*/
.btn-cv {
padding: .5em 0;
overflow: hidden;
position: relative;
background-color: black;
}
.btn-cv a {
border: solid #fff 3px;
border-radius: 12px;
box-shadow: 1px 1px 10px 0 #a1a1a1;
color: #fff;
display: block;
font-size: 1.6em;
font-weight: bold;
line-height: 1.3;
margin: 2em auto;
padding: 1em 2em .8em;
position: relative;
text-align: center;
text-decoration: none;
-webkit-transition: .2s ease-in-out;
transition: .2s ease-in-out;
vertical-align: middle;
width: 59%;
max-width: 600px;
box-sizing: border-box;
}
.btn-cv.is-fz20 a {
font-size: 20px;
}
.btn-cv a img {
vertical-align: middle;
}
.btn-cv a:after {
content: ' ' !important;
}

/* ボタン内のアイコン */
.btn-cv a:before {
content: "\f138";
font-family: "fontawesome";
font-weight: normal;
font-size: 1.1em;
margin-top: -.6em;
position: absolute;
right: 15px;
top: 50%;
}
.btn-cv a:hover {
box-shadow: 1px 1px 2px 0 #a1a1a1;
filter: alpha(opacity=70);
opacity: .7;
}

/* 2つ連続で並べる場合の余白 */
.btn-cv + .btn-cv a {
margin-top: 0;
}

/* 緑ボタン */
.btn-cv a {
background: #00a23f;
background: -webkit-linear-gradient(#00a23f, #39900a);
background: linear-gradient(#00a23f, #39900a);
text-shadow: 0 0 10px rgba(255,255,255,.8), 1px 1px 1px rgba(0,0,0,1);
}

/* 赤ボタン */
.btn-cv.is-red a {
background: #fb4e3e;
background: -webkit-linear-gradient(#00a23f, #39900a);
background: linear-gradient(#fb4e3e, #d64b26);
}

/* 青ボタン */
.btn-cv.is-blue a {
background: #09c;
background: -webkit-linear-gradient(#09c, #069);
background: linear-gradient(#09c, #069);
}

/* 黒ボタン */
.btn-cv.is-black a {
background: #666;
background: -webkit-linear-gradient(#8a8a8a, #666);
background: linear-gradient(#8a8a8a, #666);
}

/* ボタンの光沢 */
.is-reflection a {
overflow: hidden;
}
.is-reflection a:after {
-moz-animation: is-reflection 4s ease-in-out infinite;
-moz-transform: rotate(45deg);
-ms-animation: is-reflection 4s ease-in-out infinite;
-ms-transform: rotate(45deg);
-o-animation: is-reflection 4s ease-in-out infinite;
-o-transform: rotate(45deg);
-webkit-animation: is-reflection 4s ease-in-out infinite;
-webkit-transform: rotate(45deg);
animation: is-reflection 4s ease-in-out infinite;
background-color: #fff;
content: " ";
height: 100%;
left: 0;
opacity: 0;
position: absolute;
top: -180px;
transform: rotate(45deg);
width: 30px;
}
/* アニメーションを遅延させる */
.is-reflection + .is-reflection a:after {
-webkit-animation-delay: .3s;
animation-delay: .3s;
}
@keyframes is-reflection {
0% { -webkit-transform: scale(0) rotate(45deg); transform: scale(0) rotate(45deg); opacity: 0; }
80% { -webkit-transform: scale(0) rotate(45deg); transform: scale(0) rotate(45deg); opacity: 0.5; }
81% { -webkit-transform: scale(4) rotate(45deg); transform: scale(4) rotate(45deg); opacity: 1; }
100% { -webkit-transform: scale(50) rotate(45deg); transform: scale(50) rotate(45deg); opacity: 0; }
}
@-webkit-keyframes is-reflection {
0% { -webkit-transform: scale(0) rotate(45deg); opacity: 0; }
80% { -webkit-transform: scale(0) rotate(45deg); opacity: 0.5; }
81% { -webkit-transform: scale(4) rotate(45deg); opacity: 1; }
100% { -webkit-transform: scale(50) rotate(45deg); opacity: 0; }
}

/* CVボタン矢印揺れ */
.is-trembling a:before {
-webkit-animation-name:is-trembling;
-webkit-animation-duration:.8s;
-webkit-animation-iteration-count:infinite;
-webkit-animation-timing-function:ease;
-moz-animation-name:is-trembling;
-moz-animation-duration:1s;
-moz-animation-iteration-count:infinite;
-moz-animation-timing-function:ease;
}
@-webkit-keyframes is-trembling {
0% {-webkit-transform:translate(-3px, 0);}
100% {-webkit-transform:translate(0, 0);}
}

/* ボタンをバウンドさせる */
.is-bounce {
animation: bounce 4s infinite;
-moz-animation: bounce 4s infinite;
-webkit-animation: bounce 4s infinite;
-webkit-animation-delay: 4s;
animation-delay: 4s;
}
@-webkit-keyframes bounce {
0%, 4%, 10%, 18%, 100% {-webkit-transform: translateY(0);}
5% {-webkit-transform: translateY(-6px);}
12% {-webkit-transform: translateY(-4px);}
}
@keyframes bounce {
20%, 24%, 30%, 34%, 100% {-webkit-transform: translateY(0);transform: translateY(0);}
25% {-webkit-transform: translateY(-6px);transform: translateY(-6px);}
32% {-webkit-transform: translateY(-4px);transform: translateY(-4px);}
}
/* アニメーションを遅延させる */
.is-bounce + .is-bounce {
-webkit-animation-delay: .5s;
animation-delay: .5s;
}

/* ぷるるるるん! */
.is-purun {
-webkit-animation: is-purun 5s infinite;
-moz-animation: is-purun 5s infinite;
animation: is-purun 5s infinite;
}
@-webkit-keyframes is-purun {
0% { -webkit-transform: scale(1.0, 1.0) translate(0%, 0%); }
4% { -webkit-transform: scale(0.9, 0.9) translate(0%, 3%); }
8% { -webkit-transform: scale(1.1, 0.8) translate(0%, 7%); }
12% { -webkit-transform: scale(0.9, 0.9) translate(0%, -7%); }
18% { -webkit-transform: scale(1.1, 0.9) translate(0%, 3%); }
25% { -webkit-transform: scale(1.0, 1.0) translate(0%, 0%); }
}
@keyframes is-purun {
0% { transform: scale(1.0, 1.0) translate(0%, 0%); }
4% { transform: scale(0.9, 0.9) translate(0%, 3%); }
8% { transform: scale(1.1, 0.8) translate(0%, 7%); }
12% { transform: scale(0.9, 0.9) translate(0%, -7%); }
18% { transform: scale(1.1, 0.9) translate(0%, 3%); }
25% { transform: scale(1.0, 1.0) translate(0%, 0%); }
}
/* アニメーションを遅延させる */
.is-purun + .is-purun {
-webkit-animation-delay: .5s;
animation-delay: .5s;
}

/**
* ===============================================
* MediaQuery : スマホ対応
* ===============================================
*/
@media only screen and (max-width: 600px) {
/* コンバージョンボタン */
.btn-cv a {
font-size: 1.3em;
margin: 0 auto 1em;
width: auto;
}
}

これでよし。

-CMS, css, コンテンツ, 新着情報
-

執筆者:

関連記事

domo Todo+

iPhoneの神アプリをおすすめ【3】domo Todo+

私のiPhoneのホーム画面1画面目に鎮座する神アプリを紹介するシリーズ。 1画面目のヘビーに使い込んでいるiPhoneアプリ 第3回目は、domo Todo+を紹介する。 domo Todo+ do …

HDMIケーブル

HDMIケーブルにて価格破壊を考える

11月の話で恐縮だが、テレビを買った。 ご多分に漏れず、エコポイントを意識して駆け込みで購入したのだ。 ところが、その時点でテレビの納期が1ヶ月先とのこと。 そりゃあないでしょ! という気持ちになった …

MacBook Pro with Retina Display

MacBook Pro with Retina Displayを設定した3日の戦い

MacBook Pro with Retina Display MacBook Pro with Retina Displayを購入した。 macでは実に4年ぶりとなるリプレイスで、今回初めてtime …

WorldCard Mobile

WorldCard Mobileを入れた

名刺管理ソフトWorldCard Mobile 前々から気になっていたiPhoneアプリ「WorldCard Mobile」を導入してみた。 無料バージョンで試してみると、実に認識力が高い。 価格は1 …

MacBook Pro with Retina Display

MacBook Pro with Retina Displayを買うべきこれだけの理由

先日から話題となっているMacBook Pro with Retina Displayを注文した。 当初はMacBook Air 13″を購入しようと思っていたのだが、急遽変更した。 &n …