0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

画像をぼかす方法(超簡単)

Posted at

#簡単!背景画像をぼかす方法
144f999b1a92884d6f066877ca4bb31e.jpg
#CSSに一言だけ付け足せばOK!

index.html.erb
<%= image_tag "star.webp", class:"bgimage" %>

##上記のclass名はお好みで!次はCSS!!

○○.css
.bgimage{
  filter: blur(5px);
  width: 100%;
}

##上記の通りfilter: blur(5px);を追加すればOK!
##5pxとなっていますが、1にするにも10にするにもぼかしの濃さを調整できますのでお好みで!

widthは100%にしておくと画面幅がぴったりになると思うのでこちらも忘れずに!

#現場からは以上です!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?