Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
嗨,我有一个这样的 div
这是一个 div 框架
这是我的图片
这是结果
图片的宽度和高度不固定,因为我不知道图片的大小
请帮我
您可以根据以下百分比设置图像宽度/高度div:
div
div img { width:100%; height:100%; }
http://jsfiddle.net/Curt/x83dk/
你可以这样写:
CSS
div{ border:5px solid red; display:inline-block; box-shadow:0 0 0 10px green; margin:100px; } img{ vertical-align:top; }
HTML
<div><img src="http://i.stack.imgur.com/SWutL.jpg"></div>
</p>
检查这个http://jsfiddle.net/QkT7d/
OK, here goes, hopefully this makes sense! I have a small project based off of the appfuse web service only archetype. I have a business facade which has a DAO injected, through this DAO I request som