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.mzph.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…