目次
ボーダーのカスタマイズサンプル一覧
直線
Sample
<p class="t8-border-1">Sample</p>.t8-border-1{
border-bottom: 3px solid #0dcaf0;
}直線(2色)
Sample
<p class="t8-border-1a">Sample</p>.t8-border-1a{
border-bottom: 3px solid #0dcaf0;
}
.t8-border-1a:after {
position: absolute;
padding: 0.5em;
content: " ";
display: block;
border-bottom: solid 3px blue;
bottom: -0.5px;
left:-5px;
width: 50%;
}直線(立体)
<p class="t8-border-1b"></p>.t8-border-1b{
border-bottom: 3px solid #0dcaf0;
}破線
Sample
<p class="t8-border-2">Sample</p>.t8-border-2{
border-bottom: 3px dashed #0dcaf0;
}点線
Sample
<p class="t8-border-3">Sample</p>
.t8-border-3{
border-bottom: 3px dotted #0dcaf0;
}二重線
Sample
<p class="t8-border-4">Sample</p>.t8-border-4{
border-bottom: 3px double #0dcaf0;
}マーカー
Sample
<p class="t8-border-5">Sample</p>.t8-border-5{
background: linear-gradient(transparent 70%, #0d6efd 70%);
}吹き出し
Sample
<p class="t8-border-5a">Sample</p>.t8-border-5a {
position: relative;
background-color: transparent;
border-bottom: solid 2px #0d6efd;
padding: 15px;
min-width: 250px;
max-width: 100%;
text-align: center;
}
.t8-border-5a:before,
.t8-border-5a:after {
content: "";
position: absolute;
top: 100%;
left: 50%;
-webkit-transform: translateX(-50%);
transform: translateX(-50%);
}
.t8-border-5a:before {
border: solid 12px transparent;
border-top: solid 12px #0d6efd;
}
.t8-border-5a:after {
border: solid 14px transparent;
border-top: solid 14px #0d6efd;
margin-top: -5px;
}
.t8-border-5a::after {
border-color: transparent;
}ストライプ
Sample
<p class="t8-border-6">Sample</p>.t8-border-6 {
position: relative;
color: #fff;
font-size:1.5em;
}
.t8-border-6:after {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 10px;
background: repeating-linear-gradient(-45deg, #0d6efd, #0d6efd 2px, transparent 2px, transparent 6px);
}グラデーション
Sample
<p class="t8-border-7">Sample</p>.t8-border-7 {
color: #fff;
font-size:1.5em;
position: relative;
padding: 0.5em 0;
}中央寄せ
Sample
<p class="t8-border-8">Sample</p>.t8-border-8 {
padding: 0.5rem 0 1rem;
background: linear-gradient(90deg, #0dcaf0 0% 33%, #0dcaf0 33% 66%, #0dcaf0 66%);
background-repeat: no-repeat;
background-size: 3rem 0.3rem;
background-position: bottom;
font-weight: bold;
font-size: 1.5em;
text-align: center;
}スライド(中央)
Sample
<p class="t8-border-9">Sample</p>.t8-border-9{
text-align: center;
}
.t8-border-9::after {
position: absolute;
left: 0;
content: '';
width: 100%;
height: 2px;
background: #0dcaf0;
bottom: -1px;
transform: scale(0, 1);
transform-origin: center top;
transition: transform 0.3s;
}
.t8-border-9:hover::after {
transform: scale(1, 1);
}スライド(左右)
Sample
<p class="t8-border-10">Sample</p>.t8-border-10::after {
position: absolute;
left: 0;
content: '';
width: 100%;
height: 2px;
background: #0dcaf0;
bottom: -1px;
transform: scale(0, 1);
transform-origin: left top;
transition: transform 0.5s;
}
.t8-border-10:hover::after {
transform: scale(1, 1);
}スライド(上下)
Sample
<p class="t8-border-10a">Sample</p>.t8-border-10a::after {
position: absolute;
left: 0;
content: '';
width: 100%;
height: 3px;
background: #0dcaf0;
bottom: -10px;
opacity: 0;
visibility: hidden;
transition: 0.5s;
}
.t8-border-10a:hover::after {
visibility: visible;
bottom: 5px;
opacity: 1;
}画像背景
Sample
<p class="t8-border-12">Sample</p>.t8-border-12 {
padding: 0.5rem 0 1rem;
background-image: url(http://temp8.plat4.net/wp-content/uploads/2023/09/Ciri_staroceanoverlayelectricfairyidolgirl4k_aad1e0c6-cf24-400c-9ac4-fd87a2350a99.png);
background-repeat: repeat-x;
background-size: 30rem 0.5rem;
background-position: bottom;
font-weight: bold;
font-size: 1.5em;
text-align: center;
}画像背景(ループ)
Sample
<p class="t8-border-13">Sample</p>.t8-border-13 {
padding: 0.5rem 0 1rem;
background-image: url(http://temp8.plat4.net/wp-content/uploads/2023/09/Ciri_staroceanoverlayelectricfairyidolgirl4k_aad1e0c6-cf24-400c-9ac4-fd87a2350a99.png);
background-repeat: repeat-x;
background-size: 30rem 0.5rem;
font-weight: bold;
font-size: 1.5em;
text-align: center;
animation: loop 20s linear infinite;
}
@keyframes loop {
from {
background-position: 0 0;
}
to {
background-position: 2000px 0;
}
}