前提是div在父元素中占位; 详见博客地址:http://www.cnblogs.com/DebugLZQ/archive/2011/08/09/2132381.html 转载于:https://www.cnblogs.com/summer323/p/5282375.html