如何在我的网站上修复CSS,以便大图像不会溢出容器?

Mic*_*yor 4 css

我有一个非常酷的网站,允许人们上传图像.有时图像真的很大,如下面的div所示:

溢出http://img242.imageshack.us/img242/6711/overflowds1.png

有没有我可以添加到我的DIV来解决这个问题的风格?

Joe*_*ips 10

将div上的CSS overflow属性设置为以下值之一:

overflow: auto;    /* Adds scrollbars only when necessary */
overflow: scroll;  /* Adds inactive scrollbars until needed, then activates */
overflow: visible; /* Causes the div to expand to fit the content */
overflow: hidden;  /* Hides any content that overflows */
Run Code Online (Sandbox Code Playgroud)