CSSを使用して画像の右上の位置にテキストを配置する方法
テキストを右上に配置するには、rightプロパティとtopプロパティを使用します。次のコードを実行して実装してみてください。
例
<!DOCTYPE html>
<html>
<head>
<style>
.box {
position: relative;
}
img {
width: 100%;
height: auto;
opacity: 0.6;
}
.direction {
position: absolute;
top: 10px;
right: 19px;
font-size: 13px;
}
</style>
</head>
<body>
<h1>Heading One</h1>
<p>Below image has text in the top right:</p>
<div class = "box">
<img src = "https://www.tutorialspoint.com/python/images/python_data_science.jpg" alt = "Tutorial"
width = "800" height = "400">
<div class="direction">Top Right Corner</div>
</div>
</body>
</html> -
CSSでテキストボタンのスタイルを設定するにはどうすればよいですか?
以下は、CSSでテキストボタンのスタイルを設定するコードです- 例 <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> button { border: none; color: white; font-weight: bolder; &nb
-
CSSで光るテキストを作成するにはどうすればよいですか?
CSSを使用して光るテキストを作成するためのコードは、次のとおりです- 例 <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> body { background-color: rgb(0, 0, 0); font-family