装飾:お知らせリンク
「重要なお知らせ」へのリンクボタン設置例
パターンA
.announceLinkA {
width: 90%;
margin: 0 auto;
text-align: center;
}
.announceLinkA a {
text-decoration: none;
display: block;
margin: 25px auto;
padding: 25px 0px;
font-size: 1.25em;
background: repeating-linear-gradient(-45deg,rgba(87,175,197,0.05) 0,rgba(87,175,197,0.05) 8px,#fff 8px,#fff 10px);
border: 1px solid rgba(87,175,197,0.8);
}
.announceLinkA a:hover {
opacity: 0.7;
}
.announceLinkA a strong {
background: url(/images/iconExclamation1.png)left center no-repeat;
background-size: 1.5em;
padding: 15px 0 10px 2em;
}
.announceLinkA a span {
background: #337ab7;
border-radius: 25px;
color: #fff;
font-size: .75em;
font-weight: bold;
margin: 0 0 0 30px;
padding: 4px 20px;
position: relative;
bottom: 2px;
}
@media screen and (max-width: 660px) {
.announceLinkA {
width: 100%;
}
}
@media screen and (max-width: 480px) {
.announceLinkA a span {
display: block;
width: 160px;
margin: 10px auto 0;
}
}
パターンB
!重要なお知らせ
.announceLinkB {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
width: 90%;
margin: 25px auto;
background: #7db5df;
box-shadow: 0 0 5px rgb(0 0 0 / 30%);
border-radius: 5px;
}
.announceLinkB h3 {
border: none;
padding: 0 10px;
color: #fff;
margin: 0;
width: 280px;
font-size: 1.1em;
line-height: 1.5em;
align-self: center;
text-align: center;
}
.announceLinkB h3::after {
border: none;
}
.announceLinkB h3 i {
background: #fff;
color: #337ab7;
font-style: normal;
font-weight: bold;
width: 1.5em;
height: 1.5em;
display: inline-block;
border-radius: 50%;
margin: 0 6px 0 0;
position: relative;
bottom: 1px;
}
.announceLinkB ul {
margin: 0;
padding: 10px;
width: 100%;
background: #fff;
border-radius: 0 5px 5px 0;
}
.announceLinkB ul li {
list-style: none;
letter-spacing: 0.05em;
font-weight: bold;
margin: 0;
}
.announceLinkB ul li a {
color: #666;
text-decoration: none;
width: 100%;
display: block;
padding: 15px 2em 15px 15px;
line-height: 1.3em;
position: relative;
}
.announceLinkB ul li a:hover {
background: rgba(125,181,223,0.1);
}
.announceLinkB ul a::after {
color: #337ab7;
content: “\f105”;
font-family: ‘Font Awesome 5 Free’;
position: absolute;
right: 10px;
}
@media screen and (max-width: 660px) {
.announceLinkB {
display: block;
width: calc(100% – 7px);
}
.announceLinkB h3 {
width: 100%;
padding: 15px 0;
font-size: 18px;
}
.announceLinkB ul {
border-radius: 0 0 5px 5px;
}
.announceLinkB ul li a {
padding: 10px 2em 10px 15px;
}
}
パターンC
!Information– 重要なお知らせ –
.announceLinkCwrap {
background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0) 2px, rgba(87, 175, 197, 0.1) 2px, rgba(87, 175, 197, 0.1) 3px );
padding: 30px 20px;
}
.announceLinkC h3 {
border: none;
color: #337ab7;
font-family: ‘Noto Serif JP’, serif;
font-size: 1.5em;
margin: 0 0 20px;
padding: 0;
}
.announceLinkC h3::after {
border: none;
}
.announceLinkC h3 i {
background: #337ab7;
border-radius: 50%;
color: #fff;
display: inline-block;
font-style: normal;
line-height: 1.5em;
margin-right: 10px;
width: 1.5em;
height: 1.5em;
text-align: center;
}
.announceLinkC h3 strong {
font-family: auto;
font-size: .75em;
margin-left: 10px;
}
.announceLinkC ul {
overflow: hidden;
width: 100%;
background: rgba(255,255,255,0.8);
border: 1px solid rgba(87, 175, 197, 0.8);
margin: 0;
padding: 20px;
}
.announceLinkC ul li {
list-style: none;
width: 50%;
float: left;
margin: 0;
padding: 5px 15px;
}
.announceLinkC ul li:nth-of-type(n+2) {
border-left: 1px solid rgba(87, 175, 197, 0.6);
}
.announceLinkC ul li a {
color: #666;
display: block;
text-decoration: none;
width: 100%;
padding: 0 1.5em 0 0;
position: relative;
}
.announceLinkC ul li a::after {
color: #337ab7;
content: “\f152”;
font-family: ‘Font Awesome 5 Free’;
position: absolute;
right: 5px;
}
.announceLinkC ul li a:hover,
.announceLinkC ul li a:hover::after {
color: rgba(125, 181, 223, 0.8);
}
@media screen and (max-width: 660px) {
.announceLinkC ul {
padding: 10px 20px;
}
.announceLinkC ul li {
width: 100%;
float: none;
padding: 10px;
}
.announceLinkC ul li:nth-of-type(n+2) {
border-left: none;
border-top: 1px solid rgba(87, 175, 197, 0.6);
}
}
@media screen and (max-width: 480px) {
.announceLinkC h3 {
text-align: center;
}
.announceLinkC h3 strong {
display: block;
margin-top: 5px;
}
}
