CSS
 Computer >> コンピューター >  >> プログラミング >> CSS

CSSで丸で囲んだ画像を作成する


CSSを使用して円で囲まれた画像を作成するには、 border-radiusを使用します。 プロパティ。

<!DOCTYPE html>
<html>
   <head>
      <style>
         img {
            border-radius: 50%;
            border: 1px solid blue;
         }
      </style>
   </head>
   <body>
      <h2>Coding Ground</h2>
      <img src = "https://www.tutorialspoint.com/videotutorials/images/coding_ground_home.jpg" alt="Online Compiler" width="300" height="300">
   </body>
</html>

  1. CSSでぼやけた背景画像を作成するにはどうすればよいですか?

    以下は、CSSでぼやけた背景画像を作成するためのコードです- 例 <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <style> body, html {    height: 100vh;    margin: 0;    font-family: "Segoe UI&qu

  2. CSSでスティッキーイメージを作成するにはどうすればよいですか?

    以下は、CSSでスティッキーな画像を作成するためのコードです- 例 <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style> img {    position: sticky;    top: 0;    width: 300px;    height: 300