Home >Web Front-end >HTML Tutorial >CSS手动改变DIV高宽_html/css_WEB-ITnose

CSS手动改变DIV高宽_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:27:021149browse

本实例代码可以使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属性

更多特效:

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn