大佬教程收集整理的这篇文章主要介绍了html – Margin-top:100%得到父宽度值…奇怪,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> html{ outline: 1px #0ff solid; BACkground: rgba(0,255,0.1); } body{ margin: 0; padding: 0; outline: 1px #00f solid; BACkground: rgba(0,0.1); } #aDiv{ width: 300px; outline: 1px #f00 solid; BACkground: rgba(255,0.2); } #bDiv{ margin-top: 100%; outline: 1px #0f0 solid; BACkground: rgba(0,0.1); } </style> </head> <body> <div id="aDiv"> <div id="bDiv"> content </div> </div> </body> </html>
当您更改#aDiv宽度时,#bDiv margin-top将更改为相同的值.
我不知道它是如何可能的,高度是宽度.无论如何也许你可以解释一下我在做什么?
最好的祝福
以上是大佬教程为你收集整理的html – Margin-top:100%得到父宽度值…奇怪全部内容,希望文章能够帮你解决html – Margin-top:100%得到父宽度值…奇怪所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。