CSS3ボーダー画像の追加
CSS3に境界線画像を追加するには、border-imageプロパティを使用します。これは、次のプロパティの省略形のプロパティです-
border-image-source border-image-slice border-image-width border-image-outset border-image-repeat
値は次のように設定できます;
border-image: source slice width outset repeat|initial|inherit;
例
例を見てみましょう-
<!DOCTYPE html>
<html>
<head>
<style>
#demo {
border: 20px solid;
padding: 20px;
border-image: url(https://www.tutorialspoint.com/images/home_ai_python.png) 20 round;
}
</style>
</head>
<body>
<h1>PyTorch Tutorial</h1>
<p>PyTorch is an open source machine learning library for Python and is completely based on Torch.</p>
<p id="demo">It is primarily used for applications such as natural language processing.</p>
</body>
</html> 出力
例
別の例を見てみましょう-
<!DOCTYPE html>
<html>
<head>
<style>
#demo {
border: 20px solid;
padding: 20px;
border-image: url(https://www.tutorialspoint.com/images/home_pytorch.png) 40% round;
}
</style>
</head>
<body>
<h1>TensorFlow Tutorial</h1>
<p>TensorFlow is an open source machine learning framework for all developers. It is used for implementing machine learning and deep learning applications.</p>
<p id="demo"> To develop and research on fascinating ideas on artificial intelligence, Google team created TensorFlow. </p>
</body>
</html> 出力
-
CSS3で複数の背景を追加する
複数の背景を追加するには、CSSのbackground-imageプロパティを使用します。以下は、複数の背景を追加するためのコードです- 例 <!DOCTYPE html> <html> <head> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } div { background-image: url("https://pngimg
-
CSSで境界線画像を作成する方法
CSSで境界線画像を作成するには、border-imageプロパティを使用します。以下は、CSSで境界線画像を作成するためのコードです- 例 <!DOCTYPE html> <html> <head> <style> body { font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; } .border1 { border: 10px solid transparent; padd