css模糊_如何使用CSS模糊圖像?

css模糊

Introduction:

介紹:

Sometimes even the professional developers tend to forget the various basic properties which can be applied to solve very simple problems, therefore the fundamentals of developing a website or web page should be very clear and must be practiced thoroughly. This section is all about one such property which is used to deal with the most-used element on a website or web page.

有時,即使是專業的開發人員也往往會忘記可用于解決非常簡單的問題的各種基本屬性,因此開發網站或網頁的基礎應該非常清楚,并且必須徹底地實踐。 本節全部關于一個此類屬性,該屬性用于處理網站或網頁上最常用的元素。

Trivia:

瑣事:

Images are very interesting elements on any web page or website but to deal with them is equally critical and important as well. Images enhance the appearance of the web page or website, besides images attract many users and any user would love to see some images while visiting any website or web page. Images are used for reference for some piece of information, besides the images can be used to give a clear picture of what is being said in an article, blog, etc. Therefore to deal with such fundamental elements is of paramount importance. This section is about one such property which is widely used while dealing with the images, which is known as blur property in CSS.

圖像在任何網頁或網站上都是非常有趣的元素,但是處理它們同樣至關重要,也很重要。 圖像增強了網頁或網站的外觀,圖像吸引了許多用戶,并且任何用戶都希望在訪問任何網站或網頁時看到一些圖像。 圖像可用于某些信息的參考,此外圖像還可用于清晰地顯示文章,博客等中所說的內容。因此,處理此類基本元素至關重要。 本節是關于在處理圖像時廣泛使用的此類屬性, 在CSS中稱為模糊屬性

Let us move forward and have a look at the definition below,

讓我們繼續前進,看看下面的定義,

Definition:

定義:

Since by looking at the name of the property it is quite obvious to know that what is the purpose of this property.

因為通過查看屬性的名稱,很明顯知道該屬性的目的是什么。

When the user needs to blur a specific image then this blur CSS property comes into play. The filter property is used to convert any image into a blurred image. Very basic property and very easy to implement. This property is used widely and proves to be of utmost importance to make a website or web page responsive.

當用戶需要模糊特定的圖像時,該模糊CSS屬性就會起作用。 filter屬性用于將任何圖像轉換為模糊圖像 。 非常基本的屬性,非常容易實現。 此屬性被廣泛使用,并被證明對于使網站或網頁具有響應能力至關重要。

Syntax:

句法:

    Element{
filter:blur();
}

Where the user can specify the intensity of the blur effect that is used to blur the image.

用戶可以在其中指定用于模糊圖像的模糊效果的強度。

Example:

例:

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
img {
filter: blur(4px);
}
</style>
</head>
<body>
<p>Apply a blur effect to the image below:</p>
<img src="img_forest.jpg" width="300" height="300">
</body>
</html>

Output

輸出量

CSS | blur an image | Example

It is very clear by looking at the result of the example above that the image of the forest is blurred with 4px intensity.

通過查看以上示例的結果可以很清楚地看到,森林的圖像以4px的強度模糊

Note: To use this property, you must ensure that you are using the value filter and then followed by the property blur(), otherwise the property would be rendered useless.

注意:要使用此屬性,必須確保使用的是值過濾器 ,然后使用屬性blur() ,否則該屬性將變為無用。

Closing tips:

結束提示:

Since the property is very easy to implement and to understand but one must be very careful while using the blur property in CSS as this property can not be used on every image because if you make a relevant image as a blur then the user would not be able to see the content of that image.

由于該屬性非常容易實現和理解,但是在CSS中使用blur屬性時必須非常小心,因為此屬性不能在所有圖像上使用,因為如果將相關圖像作為模糊對象,則用戶不會能夠看到該圖像的內容。

翻譯自: https://www.includehelp.com/code-snippets/how-to-blur-an-image-using-css.aspx

css模糊

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/377894.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/377894.shtml
英文地址,請注明出處:http://en.pswp.cn/news/377894.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

七、決策樹算法和集成算法

一、決策樹算法 Ⅰ&#xff0c;樹模型 決策樹&#xff1a;從根節點開始一步步走到葉子節點&#xff08;決策&#xff09; 所有的數據最終都會落到葉子節點&#xff0c;既可以做分類也可以做回歸 對于分類&#xff1a;是由眾數決定的&#xff0c;例如爺爺奶奶媽媽都是負數&…

leetcode 538. 把二叉搜索樹轉換為累加樹 思考分析

題目 給出二叉 搜索 樹的根節點&#xff0c;該樹的節點值各不相同&#xff0c;請你將其轉換為累加樹&#xff08;Greater Sum Tree&#xff09;&#xff0c;使每個節點 node 的新值等于原樹中大于或等于 node.val 的值之和。 提醒一下&#xff0c;二叉搜索樹滿足下列約束條件&…

SQL中GROUP BY語句與HAVING語句的使用

最近在學習SQL Server相關知識&#xff0c;一直不知道怎么使用GROUP BY語句&#xff0c;經過研究和練習&#xff0c;終于明白如何使用了&#xff0c;在此記錄一下同時添加了一個自己舉的小例子&#xff0c;通過寫這篇文章來加深下自己學習的效果&#xff0c;還能和大家分享下&a…

scala語言示例_var關鍵字與Scala中的示例

scala語言示例Scala var關鍵字 (Scala var keyword) The var Keyword in scala is used to declare variables. As Scala does not require explicit declaration of data type of the variable, var keyword is used. The variable declared using the var keyword as mutable…

八、決策樹算法實驗可視化展示

一、樹模型的可視化展示 官網下載安裝包 右擊管理員身份運行&#xff0c;直接下一步即可。 配置環境變量&#xff1a; 將安裝好的可視化軟件的bin文件夾路徑添加到系統環境變量Path下即可 打開cmd&#xff0c;輸入dot -version&#xff0c;出現相關信息即安裝成功 二、決策…

關于在頁面中針對不同版本的IE瀏覽器實現不同的JS或者CSS樣式

一般會用到<!--[if IE]>這里是正常的html代碼<![endif]--> 條件注釋只能在windows Internet Explorer(以下簡稱IE)下使用&#xff0c;因此我們可以通過條件注釋來為IE添加特別的指令。因為這只是IE瀏覽器支持的注釋。 1&#xff0c;條件注釋的基本結構和HTML的注釋…

機器學習筆記:PCA的簡單理解以及應用建議

用notability做的筆記&#xff0c;比較隨意&#xff0c;對于第五點的PCA錯誤使用需要特別強調。 目錄1、PCA與線性回歸2、PCA主成分數量選擇3、壓縮重現4、PCA應用建議5、PCA的錯誤使用1、PCA與線性回歸 2、PCA主成分數量選擇 3、壓縮重現 4、PCA應用建議 5、PCA的錯誤使用

關于asp.net中的錯誤提示“將截斷字符串或二進制數據。 語句已終止。”

好久沒有更新博客了&#xff0c;今天在寫asp.net網站的時候&#xff0c;出現了這個問題。錯誤提示“將截斷字符串或二進制數據。 語句已終止。”通過調試&#xff0c;發現在插入數據的時候&#xff0c;由于插入的數據的字符或者二進制數據的長度大于原來定義的類型的長度。及保…

c# 無法將類型隱式轉換_C#中的隱式類型數組

c# 無法將類型隱式轉換C&#xff03;隱式類型數組 (C# Implicitly Typed Arrays) Like implicitly typed variables, we can also declare an array without specifying its type such type of arrays are known as Implicitly typed arrays. 像隱式類型的變量一樣&#xff0c;…

一、信用卡卡號識別

一、思路分析 大體思路&#xff1a;首先拿到一張銀行卡&#xff0c;我們得有銀行卡號數字的0-9樣式的模板&#xff0c;然后再通過不同數字的輪廓的外接矩形來進行匹配&#xff0c;最終識別出銀行卡號所對應的數字。 銀行卡數字模板&#xff1a; 銀行卡信息&#xff1a; 拿到…

bootstrap網格系統_如何使用Bootstrap網格系統?

bootstrap網格系統In the last article, we learned how to create a simple page of Bootstrap? Now, we will learn what is "Grid System" in Bootstrap and how we can use or implement it in our bootstrap page? As you know bootstrap is a mobile-friendl…

有關WriteableBitmap和BitmapImage之間的相互轉換

對于WP7中圖形處理有關WriteableBitmap和BitmapImage之間的相互轉換&#xff0c;給大家幾個簡單實用的方法。一、WriteableBitmap轉為BitmapImage對象var bi new BitmapImage(); bi.SetSource(wb.ToImage().ToStream()); //其中wb是WriteableBitmap對象。 二、BitmapImage轉為…

回溯法初步

本文為參考公眾號所做的筆記。 代碼隨想錄原文 回溯法本質是窮舉&#xff0c;窮舉所有可能&#xff0c;然后選出我們想要的答案&#xff0c;所以它并不是一個高效的算法。但是由于有些問題本身能用暴力搜出來就不錯了&#xff0c;所以回溯法也有很多的應用。 回溯法解決的問題…

QEMU中smp,socket,cores,threads幾個參數的理解

在用QEMU創建KVM guest的時候&#xff0c;為了指定guest cpu資源&#xff0c;用到了-smp, -sockets, -cores, -threads幾個參數&#xff0c; #/usr/bin/qemu-system-x86_64 -name pqsfc085 -enable-kvm -m 2048 -smp 2,sockets2,cores1,threads1 \ -boot ordernc,onced \ -hda …

二、文檔掃描OCR

一、思路分析 首先&#xff0c;拿到一張文檔&#xff0c;我們需要對文檔進行預處理操作&#xff0c;再進行輪廓檢測&#xff0c;因為就算拿到文檔輪廓&#xff0c;但是這些輪廓也有可能是歪歪扭扭的&#xff0c;這時候需要通過一系列的透視變換操作&#xff0c;將文檔擺正。通…

ruby hash方法_Ruby中帶有示例的Hash.select方法

ruby hash方法哈希選擇方法 (Hash.select Method) In this article, we will study about Hash.select Method. The working of this method can be predicted with the help of its name but it is not as simple as it seems. Well, we will understand this method with the…

leetcode 77. 組合 思考分析

目錄1、題目2、回溯法思路3、參考其他思路&#xff0c;更深入了解這個問題4、剪枝優化可能需要回顧到的知識文章&#xff1a;1、常用算法總結(窮舉法、貪心算法、遞歸與分治算法、回溯算法、數值概率算法)2、回溯法初步刪除vector容器中的對象元素的三種方法:pop_back, erase與…

ASP 調用dll(VB)及封裝dll實例

ASP調用dll及封裝dll實例&#xff0c;封裝為dll可以提供運行效率&#xff0c;加密代碼。 打開VB6&#xff0c;新建ActiveX DLL 2、在工程引用中加入Microsoft Active Server Pages Object Library選擇 3、填加代碼如下Code Start 聲明部分 Private MyScriptingContext As Scrip…

三、全景拼接

一、項目所涉及到的一些知識點 Ⅰ&#xff0c;BF(Brute-Force)暴力匹配&#xff1a;把兩張圖像的特征點全部給算出來&#xff0c;然后使用歸一化的歐氏距離比較這兩張圖像上特征點之間的大小關系&#xff0c;越小越相似。 SIFT算法 import cv2 import numpy as np import ma…

找回自建SVN密碼

自建了一個SVN Repo自己用。重裝系統之后密碼忘了。 經過了漫長的Google過程&#xff0c;才知道Repo中的密碼居然是明文保存的。 在yourRepoDir/conf/svnserve.conf下的password-db處設置&#xff0c;通常是yourRepoDir/conf/passwd文件。 打開passwd文件&#xff0c;就是明文保…