css3如何通过resize属性修改元素大小

这篇文章给大家分享的是有关css3如何通过resize属性修改元素大小的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。

运河网站制作公司哪家好,找创新互联公司!从网页设计、网站建设、微信开发、APP开发、响应式网站建设等网站项目制作,到程序开发,运营维护。创新互联公司于2013年创立到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选创新互联公司

  为了增强用户体验,CSS3增加了很多新的属性,其中一个重要的属性就是调整大小,它允许用户通过拖动的方式来修改元素的尺寸。

到目前为止,主要用于可以使用溢出属性的任何容器元素中。

    在此之前,设计师要实现相同的UI效果,则需要通过JavaScript编写大量的脚本才能够实现,从而既费时费力,且执行效率也很低。

    resize是CSS3新增的一个非常实用的属性。

    resize属性初始值无,适用于所有溢出属性不为visible的元素。取值简单说明如下:

       none:浏览器不提供尺寸调整机制,用户不能操纵机制调节元素的尺寸。

       两者:浏览器提供双向尺寸调整机制,允许用户调节元素的宽度和高度。

       horizontal:浏览器提供单向水平尺寸调整机制,允许用户调节元素的宽度。

       vertical:浏览器提供单向垂直尺寸的调整机制,允许用户调节元素的高度。

       继承:从继承。   

    CSS3允许将属性应用到任意元素,这将使网页扩展功能拥有跨浏览器的支持。

鼠标放在右下角可以对元素进行大小的超越。

具体代码如下:

<!DOCTYPE> 

 

 

</ title > </p><p><style  type = “ text / css” ></p><p>#resize {</p><p>    背景:url(images / img10.jpg)无重复中心;</p><p>    -moz-background-clip:content;</p><p>    -webkit-background-clip:content;</p><p>    background-clip:content;</p><p>    宽度:200像素;</p><p>    高度:120像素;</p><p>    max-width:800px;</p><p>    max-height:600px;</p><p>    内边距:6px;</p><p>    边框:1px纯红色;</p><p>    调整大小:两者;</p><p>    溢出:自动;</p><p>}</p><p></ style > </p><p></ head ></p><p><body > </p><p><div  id = “ resize” > </ div > </p><p></ body > </p><p></ html ></p><p>感谢各位的阅读!关于“css3如何通过resize属性修改元素大小”这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!</p> <br> 网站标题:css3如何通过resize属性修改元素大小 <br> URL标题:<a href="http://csruizhi.cn/article/gchjos.html">http://csruizhi.cn/article/gchjos.html</a> </div> </div> <div class="other"> <h3>其他资讯</h3> <ul> <li> <a href="/article/ddgjdhj.html">提问智能聊天论文 提问技巧论文</a> </li><li> <a href="/article/ddgjdcg.html">mysql怎么调好 mysql怎么调试</a> </li><li> <a href="/article/ddgjdpe.html">java类的完整代码 一段java代码的详细解说</a> </li><li> <a href="/article/ddgjdhp.html">ip命令linux 查看IP命令</a> </li><li> <a href="/article/ddgjdjs.html">mysql怎么删除干净 mysql8023删除</a> </li> </ul> </div> </div> <div class="footer2"> Copyright © 2007-2024 成都优众联杰科技有限公司 All Rights Reserved 蜀ICP备2024116266号 <br />友情链接: <a href="http://www.kswcd.cn/" target="_blank">专业网站设计 </a><a href="http://m.cdcxhl.com/muban.html" target="_blank">成都模版网站建设 </a><a href="http://chengdu.cdcxhl.cn/dingzhi/" target="_blank">成都定制网站建设 </a><a href="http://chengdu.cdcxhl.cn/qiye/" target="_blank">企业网站制作 </a><a href="http://chengdu.cdcxhl.cn/" target="_blank">成都网站建设 </a><a href="http://www.cxhlcq.com/qiye/" target="_blank">重庆企业网站建设 </a><a href="http://www.cxjianzhan.cn/" target="_blank">成都网站设计 </a><a href="http://chengdu.cdxwcx.cn/" target="_blank">成都网站制作 </a><a href="http://m.cdcxhl.cn/seo/" target="_blank">成都网站建设推广 </a><a href="http://www.cqcxhl.com/" target="_blank">网站设计 </a><a href="http://chengdu.cdxwcx.cn/wangzhan/" target="_blank">手机网站制作 </a><a href="http://www.cdweb.net/" target="_blank">成都网站设计 </a><a href="http://www.4006tel.net/" target="_blank">app网站建设 </a><a href="http://www.cxjianzhan.com/baojia/" target="_blank">网站建设费用 </a><a href="http://www.33260.cn/" target="_blank">成都定制网站建设 </a><a href="http://chengdu.xwcx.net/mobile/" target="_blank">手机网站建设套餐 </a><a href="http://m.cdcxhl.cn/mobile/" target="_blank">网站建设公司 </a><a href="http://chengdu.cdcxhl.cn/" target="_blank">成都网站建设 </a><a href="http://www.kswjz.cn/" target="_blank">成都网站建设 </a><a href="http://m.cdcxhl.cn/qiye/" target="_blank">企业网站建设 </a><a href="http://chengdu.kswjz.com/" target="_blank">成都网站建设 </a><a href="http://www.cdxwcx.cn/" target="_blank">成都网站建设 </a></div> </body> </html> <script src="/Public/Home/js/wow.min.js"></script> <script> if (!(/msie [6|7|8|9]/i.test(navigator.userAgent))) { new WOW().init(); }; </script> <div class="sidebar"> <ul> <li><a href="http://wpa.qq.com/msgrd?v=3&uin=244261566&site=www.csruizhi.cn&menu=yes" target="_blank"><img src="/Public/Home/images/right_qq.png" /></a></li> <li><a href="http://wpa.qq.com/msgrd?v=3&uin=1683211881&site=www.csruizhi.cn&menu=yes" target="_blank"><img src="/Public/Home/images/qq.png" /></a></li> <li class="tel"><a href="tel:028-86922220"><img src="/Public/Home/images/right_tel.png" /></a></li> <div class="wx"> <span class="weixin"><img src="/Public/Home/images/weixin.jpg"><br> 微信扫一扫在线咨询</span> </div> <li><a class="fx" href="#hero"><img src="/Public/Home/images/right_up.png" /></a></li> </ul> </div> <script type="text/javascript"> $(function () { $('.sidebar .fx').click(function () { $('html,body').animate({ scrollTop: '0px' }, 800); }); }); </script> <script type="text/javascript"> $(document).ready(function () { $("#fancybox-manual-b").click(function () { $.fancybox.open({ href: 'map.html', type: 'iframe', padding: 5 }); }) }); </script> <script> $(".con img").each(function(){ var src = $(this).attr("src"); //获取图片地址 var str=new RegExp("http"); var result=str.test(src); if(result==false){ var url = "https://www.cdcxhl.com"+src; //绝对路径 $(this).attr("src",url); } }); window.onload=function(){ document.oncontextmenu=function(){ return false; } } </script>