CSSを使用したリンクのデフォルトの下線の削除
CSSを使用してリンクのデフォルトの下線を削除するには、コードは次のとおりです-
例
<!DOCTYPE html>
<html>
<head>
<style>
a:link {
color: blue;
text-decoration: none;
}
a:visited {
color: blue;
text-decoration: none;
}
</style>
</head>
<body>
<h1>Demo Heading</h1>
<div>
<p>This is the <a href="https://tutorialspoint.com">reference</a></p>
</div>
</body>
</html> 出力
例
別の例を見てみましょう-
<!DOCTYPE html>
<html>
<head>
<style>
a:link {
color: blue;
text-decoration: none;
}
a:hover {
color: blue;
text-decoration: none;
}
a:active {
color: blue;
text-decoration: none;
}
</style>
</head>
<body>
<h1>Demo Heading</h1>
<div>
<p>This is the <a href="https://tutorialspoint.com">reference</a></p>
</div>
</body>
</html> 出力
-
デフォルトのテキスト選択色をCSSで上書きするにはどうすればよいですか?
デフォルトのテキスト選択色をCSSで上書きするには、コードは次のとおりです。 例 <!DOCTYPE html> <html> <head> <style> ::-moz-selection { color: rgb(255, 255, 255); background: rgb(118, 69, 231); } ::selection { co
-
CSSを使用したロケーションカラーの設定停止
カラーストップの位置は、パーセンテージまたは絶対長として設定できます。たとえば、線形グラデーションの場合 background-image: linear-gradient( rgb(61, 255, 2) 40%, rgb(0, 174, 255) 80%, rgb(255, 29, 29) 20% ); 以下は、CSS-を使用して線形グラデーションで位置の色の停止を設定するためのコードです。 例 <!DOCTYPE html> <html> <head> <style&