CSSテキストオーバーフロープロパティ
text-overflowプロパティは、表示されていないオーバーフローしたコンテンツをユーザーに通知する方法を決定します。
例
テキストオーバーフローの例を以下に示します
<html>
<head>
<style>
p.text1 {
white-space: nowrap;
width: 200px;
border: 1px solid #000000;
overflow: hidden;
text-overflow: clip;
}
p.text2 {
white-space: nowrap;
width: 200px;
border: 1px solid #000000;
overflow: hidden;
text-overflow: ellipsis;
}
</style>
</head>
<body>
<b>Original Text:</b>
<p>Tutorials Point originated from the idea that there exists a class of
readers who respond better to online content and prefer to learn new skills at
their own pace from the comforts of their drawing rooms.</p>
<b>Text overflow:clip:</b>
<p class = "text1">Tutorials Point originated from the idea that there exists
a class of readers who respond better to online content and prefer to learn
new skills at their own pace from the comforts of their drawing rooms.</p>
<b>Text overflow:ellipsis</b>
<p class = "text2">Tutorials Point originated from the idea that there exists
a class of readers who respond better to online content and prefer to learn
new skills at their own pace from the comforts of their drawing rooms.</p>
</body>
</html> 出力
-
CSSの書き込みモードプロパティ
書き込みモードプロパティは、テキストの行を水平方向に配置するか垂直方向に配置するかを設定するために使用されます。プロパティ値は-です writing-mode: horizontal-tb|vertical-rl|vertical-lr; 例 <!DOCTYPE html> <html> <head> <style> p { writing-mode: vertical-rl; } </style> </head> <body> <h1>Demo Heading</h
-
CSSポインタ-イベントプロパティ
pointer-eventsプロパティは、ポインタイベントがトリガーされたときに要素が何らかのアクションを実行するかどうかを指定します。ポインタイベントは、マウスのクリック、タッチ、スタイラスなどでトリガーできます。 以下は、CSSのpointer-eventsプロパティを示すコードです- 例 <!DOCTYPE html> <html> <head> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-seri