CSS中的resize屬性

CSS | 調整屬性 (CSS | resize Property)

Starting note:

開始說明:

We deal with various elements regularly while we are developing a website or a web page and to organize, edit and format those elements is a very crucial task as those elements are the basic building blocks of our website.

在開發網站或網頁時,我們會定期處理各種元素,并且組織,編輯和格式化這些元素是一項非常關鍵的任務,因為這些元素是我們網站的基本組成部分。

So how as we all know there are numerous ways to style the elements of a web page or to change the functionality of those elements? This section is all about discussing one such property known as resize property in CSS.

那么,眾所周知,有多種方式可以設置網頁元素的樣式或更改這些元素的功能? 本節將討論一種這樣的屬性, 在CSS中稱為resize屬性

Definition:

定義:

The resize property in CSS is used to resize the size of the element according to the user's need and also in which directions. The resize property can take 4 values.

CSS中resize屬性用于根據用戶需要以及在哪個方向上調整元素的大小。 resize屬性可以采用4個值。

Syntax:

句法:

    Element{
Resize : none|both|vertical|horizontal;
}

Let's look at each property...

讓我們看一下每個屬性...

1)調整大小:無 (1) resize : none)

none value is applied to the resize property when the user doesn't want to resize the element. It is also the default value.

當用戶不想調整元素的大小時, none值不會應用于resize屬性 。 也是默認值。

Syntax:

句法:

    Element{
resize:none;
}

Example:

例:

<!DOCTYPE html>
<html>
<head>
<style>
div {
border: 3px solid;
padding: 15px;
width: 300px;
resize: none;
}
</style>
</head>
<body>
<h1>The resize Property</h1>
<div>
<p>None value doesn’t allow resizing of this div element.</p>
</div>
</body>
</html>

Output

輸出量

CSS | resize Property | Example 1

In the above example, you cannot resize the div element. It is static.

在上面的示例中,您無法調整div元素的大小。 它是靜態的。

2)調整大小:兩者 (2) resize : both)

both value is applied to the resize property when the user wants its element to be resizable on both sides that is width and height.

當用戶希望其元素在寬度和高度的兩側都可調整大小時, 兩個值都將應用于resize屬性

Syntax:

句法:

    Element{
resize:both;
}

Example:

例:

<!DOCTYPE html>
<html>
<head>
<style>
div {
border: 3px solid;
padding: 15px;
width: 300px;
resize: both;
overflow: auto;
}
</style>
</head>
<body>
<h1>The resize Property</h1>
<div>
<p>click and drag the bottom right corner to resize the height and width of this div element.</p>
</div>
</body>
</html>

Output

輸出量

CSS | resize Property | Example 2

In the above example, to resize click and drag the bottom right corner of this div element.

在上面的示例中,要調整大小,請單擊并拖動此div元素的右下角。

3)調整大小:垂直 (3) resize : vertical)

vertical value is applied to the resize property when the user wants to resize the height of the element according to its need.

當用戶要根據需要調整元素的高度時,將垂直值應用于resize屬性

Syntax:

句法:

    Element{
resize:vertical;
}

Example:

例:

<!DOCTYPE html>
<html>
<head>
<style>
div {
border: 3px solid;
padding: 15px;
width: 300px;
resize: vertical;
overflow: auto;
}
</style>
</head>
<body>
<h1>The resize Property</h1>
<div>
<p>click and drag the bottom right corner to resize the height of this div element.</p>
</div>
</body>
</html>

Output

輸出量

CSS | resize Property | Example 3

In the above example, the user can click and drag the bottom right corner of this div element to resize its height.

在上面的示例中,用戶可以單擊并拖動此div元素的右下角以調整其高度。

4)調整大小:水平 (4) resize : horizontal)

horizontal value is applied to the resize property when the user wants to resize the width of the element according to its need.

當用戶要根據需要調整元素的寬度大小時,將水平值應用于resize屬性

Syntax:

句法:

    Element{
resize:horizontal;
}

Example:

例:

<!DOCTYPE html>
<html>
<head>
<style>
div {
border: 3px solid;
padding: 15px;
width: 300px;
resize: horizontal;
overflow: auto;
}
</style>
</head>
<body>
<h1>The resize Property</h1>
<div>
<p>click and drag the bottom right corner to resize the width of this div element.</p>
</div>
</body>
</html>

Output

輸出量

CSS | resize Property | Example 4

In the above example, the user can click and drag the bottom right corner of this div element to resize its width.

在上面的示例中,用戶可以單擊并拖動此div元素的右下角以調整其寬度。

翻譯自: https://www.includehelp.com/code-snippets/the-resize-property-in-css.aspx

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

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

相關文章

Spring Boot + JPA + Freemarker 實現后端分頁 完整示例

Spring Boot JPA Freemarker 實現后端分頁 完整示例 界面效果 螢幕快照 2017-07-28 15.34.42.png螢幕快照 2017-07-28 15.34.26.png螢幕快照 2017-07-28 15.17.00.png螢幕快照 2017-07-28 15.16.09.png螢幕快照 2017-07-28 15.15.44.png前端代碼 <#-- 表格服務端分頁&…

物聯網網關linux帶串口,物聯網網關|串口轉HTTP GET協議

支持和Web服務器通信的物聯網網關發布時間&#xff1a;2017-05-10作者&#xff1a;上海卓嵐瀏覽量&#xff1a;55821.概述隨著物聯網的發展&#xff0c;越來越多的設備需要連接到云端。其中的設備有各類儀表、工業設備、采集設備、傳感器&#xff0c;這些設備都以串口(RS232、R…

UML--組件圖,部署圖

組件圖用于實現代碼之間的物理結構&#xff0c;詳細來說&#xff0c;就是實現代碼交互。通過接口&#xff0c;將不同的軟件&#xff0c;程序連接在一起。 【理解】 1、組件的定義相當廣泛&#xff0c;包含&#xff1a;源碼&#xff0c;子系統&#xff0c;動態鏈接庫&#xff0c…

ruby字符串截取字符串_如何在Ruby中附加字符串?

ruby字符串截取字符串There are multiple ways to do the required but we will study about three of them. 有多種方法可以滿足要求&#xff0c;但我們將研究其中的三種方法。 Method 1: With the help of predefined method concat() 方法1&#xff1a;借助預定義方法conca…

centos查找linux大文件,centos中查找出大文件命令匯總

在linux中簡單的查找文件與目錄大小很簡單#已易讀的格式顯示指定目錄或文件的大小&#xff0c;-s選項指定對于目錄不詳細顯示每個子目錄或文件的大小du -sh [dirname|filename]如&#xff1a;當前目錄的大小&#xff1a;代碼如下復制代碼du -sh .當前目錄下個文件或目錄的大小&…

WSFC真實場景仲裁處理

在本篇文章中&#xff0c;老王將從實際應用的角度來為大家講解下群集仲裁在真實情況下的呈現&#xff0c;以及出現不同點數的節點宕機應該如何處理&#xff0c;在老王本篇文章中以及以后的文章中&#xff0c;我并不會去講如何去安裝一個群集&#xff0c;后面我們也將主要專注于…

ccie是什么_CCIE的完整形式是什么?

ccie是什么CCIE&#xff1a;思科認證互聯網專家 (CCIE: Cisco Certified Internetwork Expert) CCIE is an abbreviation of the "Cisco Certified Internetwork Expert". CCIE是“ Cisco認證互聯網專家”的縮寫。 It is a technical certification, which was set …

從零開始自學c語言,從零開始學習C語言

了解指針變量&#xff0c;代碼如下&#xff1a;int main(){int a 10;//4個字節int* p &a;//取地址aprintf("%p\n",p);//有一種變量是用來存放地址的 - 指針變量printf("%p\n", &a);*p 20;//* - 解引用操作符printf("%d\n", a);return…

SFB 項目經驗-12-為某上市企業的Skype for Business購買Godday證書

《要想看Lync 2013升級SFB 2015真實項目經驗&#xff1a;請看Lync 項目經驗-01-到-Lync 項目經驗-10》本系列博文&#xff1a;Lync 項目經驗-01-共存遷移-Lync2013-TO-SFB 2015-規劃01http://dynamic.blog.51cto.com/711418/1858520 Lync 項目經驗-02-共存遷移-Lync2013-TO-SF…

在Linux中制作實用程序(MakeFile)

Hey folks, have you ever used IDEs? Most probably, yes. So whats your favorite one? Geany, CodeBlocks, DevC, Eclipse, NetBeans or something else? 大家好&#xff0c;您曾經使用過IDE嗎&#xff1f; 很有可能&#xff0c;是的。 那你最喜歡哪一個呢&#xff1f; G…

c語言單片機彩燈程序設計,用C語言實現鍵控彩燈系統

源程序&#xff1a;#include "reg51.h"#define uchar unsigned charuchar flag;uchar light,assum;void delay05s(){unsigned char i,j,k;for(i5;i>0;i--)for(j200;j>0;j--)for(k250;k>0;k--);}void delay10ms(void){unsigned char i,j;for(i20;i>0;i--)…

wdcp支持兩種安裝方式

v3.2版本已發布&#xff0c;支持多PHP版本共存共用&#xff0c;支持SSL證書&#xff0c;更多可看論壇 v3版討論區更多安裝說明請看 http://www.wdlinux.cn/bbs/thread-57643-1-1.html wdcp支持兩種安裝方式 1 源碼編譯 此安裝比較麻煩和耗時,一般是20分鐘至一個小時不等,具體視…

c語言定義5個元素數組, 對數組進行從小到大排序,定義一個5行5列的二維數組,并動態賦值,將第3列的數組進行從小到大的排序...

滿意答案xvercjdl32013.10.07采納率&#xff1a;47% 等級&#xff1a;10已幫助&#xff1a;272人#include #include int cmp(const void* a, const void* b){return *(int*)a > *(int*)b;}int main(){int arr[5][5];int tmp[5];int ct 0;int i,j;printf("input 25 …

oracle下載(轉載)

復制鏈接使用迅雷即可下載。4種包的介紹&#xff1a;***_database_*.zip 是Oracle數據庫 服務端 軟件的安裝包&#xff0c;如果你要創建一個數據庫&#xff0c;請下載這個版本***_client_*.zip 是oracle數據庫 客戶端 軟件的安裝包&#xff0c;如果你不需要創建…

c++ cdi+示例_C ++“或”關鍵字示例

c cdi示例"or" is an inbuilt keyword that has been around since at least C98. It is an alternative to || (Logical OR) operator and it mostly uses with the conditions. “ or”是一個內置關鍵字&#xff0c;至少從C 98起就存在。 它是||的替代方法 ( 邏輯…

智能循跡避障小車C語言程序編寫思路,基于單片機的智能小車紅外避障循跡系統設計與制作...

余秀玲 余秀娟摘 要&#xff1a;隨著科技的高速發展&#xff0c;人們對生活質量的要求越來越高&#xff0c;無人駕駛汽車已經被廣為研發和試用&#xff0c;由此智能小車的快速發展也是在情理之中。通過對基于單片機的智能小車的硬件及軟件設計分析&#xff0c;實現紅外避障循跡…

主板擴展槽圖解_子板:擴展到主板

主板擴展槽圖解A daughterboard is a circuit board that plugs into and extends the circuitry of the main board called motherboard. A daughterboard is connected directly to the motherboard. Unlike expansion cards, which connect with the motherboard using the …

c語言春考題目,PAT 2017年春考乙級真題(1066. 圖像過濾)(C語言)

題目原文&#xff1a;圖像過濾是把圖像中不重要的像素都染成背景色&#xff0c;使得重要部分被凸顯出來。現給定一幅黑白圖像&#xff0c;要求你將灰度值位于某指定區間內的所有像素顏色都用一種指定的顏色替換。輸入格式&#xff1a;輸入在第一行給出一幅圖像的分辨率&#xf…

NHibernate利用Mindscape.NHibernateModelDesigner實現數據庫與實體之間的轉換及操作

環境&#xff1a; &nbsp&nbspVisual Studio 2010 一、Mindscape.NhibernateModelDesigner安裝 &nbsp&nbsp在打開VS2010之后&#xff0c;我們能夠在“工具”菜單下找到“擴展管理器&#xff0c;搜索&#xff1a;Mindscape NHibernate Model Designer 下載安裝就…

樹1 樹的同構_檢查樹是否同構

樹1 樹的同構Problem statement: 問題陳述&#xff1a; Write a function to detect if two trees are isomorphic. Two trees are called isomorphic if one of them can be obtained from other by a series of flips, i.e. by swapping left and right children of a numbe…