2016-10-22 13 views

答えて

1

以下のスニペットを参照してくださいあなたのコンテナにborderプロパティを適用することが可能ですCSSとアニメーション機能を書く必要があります。私のコードを参照できます。

a{ 
 
    text-decoration:none; 
 
} 
 
a:hover { 
 
    border-bottom: 1px solid; 
 
    -webkit-animation: border-hover .6s infinite ease-in-out !important; 
 
    animation: border-hover .6s infinite ease-in-out !important 
 
} 
 

 
@-webkit-keyframes border-hover { 
 
    0%, 
 
    100% { 
 
     border-bottom-style: dotted 
 
    } 
 
    25%, 
 
    50% { 
 
     border-bottom-style: dashed 
 
    } 
 
    75% { 
 
     border-bottom-style: solid 
 
    } 
 
} 
 

 
@-moz-keyframes border-hover { 
 
    0%, 
 
    100% { 
 
     border-bottom-style: dotted 
 
    } 
 
    25%, 
 
    50% { 
 
     border-bottom-style: dashed 
 
    } 
 
    75% { 
 
     border-bottom-style: solid 
 
    } 
 
} 
 

 
@-o-keyframes border-hover { 
 
    0%, 
 
    100% { 
 
     border-bottom-style: dotted 
 
    } 
 
    25%, 
 
    50% { 
 
     border-bottom-style: dashed 
 
    } 
 
    75% { 
 
     border-bottom-style: solid 
 
    } 
 
} 
 

 
@keyframes border-hover { 
 
    0%, 
 
    100% { 
 
     border-bottom-style: dotted 
 
    } 
 
    25%, 
 
    50% { 
 
     border-bottom-style: dashed 
 
    } 
 
    75% { 
 
     border-bottom-style: solid 
 
    } 
 
}
<a href="#" class"link">Link goes here</a>

0

これは、移行に行われ、あなたはHREFあなたを置く場合

body{ 
 
    background:black; 
 
    color:orange; 
 
} 
 
#somethin{ 
 
    display:inline-block; 
 
    border-bottom:solid transparent 5px; 
 
    transition:all 1s; 
 
} 
 
#somethin:hover{ 
 
    cursor:pointer; 
 
    border-bottom:solid red 5px; 
 
    
 
}
<div id="somethin"> 
 
Infinite Loop 
 
</div>

0

文字装飾スタイルのためCSS3のサポートが機能していないため、私は境界線の下を使用し、ここでのサンプルコードは次のとおりです。

<!html> 
<html> 
<head> 
    <style> 
     @keyframes cool-effect { 
      from { 
       border-bottom-style: solid; 
      } 
      50% { 
       border-bottom-style: dotted; 
      } 
      to { 
       border-bottom-style: dashed; 
      } 
     } 

     .fancy { 
      width : 300px; 
      border-bottom : 2px solid #000; 
     } 
     .fancy:hover { 
      -webkit-animation: cool-effect 1s infinite; 
      -o-animation:cool-effect 1s infinite; 
      animation: cool-effect 1s infinite; 
     } 
    </style> 
</head> 
<body> 
    <h2 class="fancy">Underline awesome effect !</h2> 
</body> 
</html> 
関連する問題