本文主要是介绍CSS手动改变DIV高宽,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
本实例代码可以使DIV可以手动改变大小
效果体验:http://hovertree.com/code/css/resize.htm
代码如下:
<!DOCTYPE html>
<html>
<head><title>何问起</title><base target="_blank" />
<style>
div
{
background-color:#f0f0f0;
border:solid red 1px;
padding:10px 40px;
width:300px;
resize:both;
overflow:auto;
}
</style>
</head>
<body><div>resize 属性规定是否可由用户调整元素尺寸 - 何问起</div><p><b>注释:</b> Firefox 4+、Safari 以及 Chrome 支持 resize 属性。</p>
<a href="http://hovertree.com/h/bjaf/css3_resize.htm">参考</a>
<a href="http://hovertree.com/code/css/resize.htm">本文地址</a>
</body>
</html>
参考:css3的resize属性
更多特效:http://www.cnblogs.com/jihua/p/webfront.html
这篇关于CSS手动改变DIV高宽的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!