有些帖子如as here表示您可以设置
display: inline-block
给父母,但这对我没什么用。然后尺寸为0px×0px。
这是HTML
<div id='si'>
<p id='si_but' class='si_match blue_but radius_all small_white'>SignIn</p>
<p id='si_cov' class='si_match opaque_but radius_all small_dark'>SignIn</p>
</div>
这是CSS
#si{
display: inline-block;
position: relative;
}
.si_match{
position: absolute;
line-height: 40px;
padding: 0px 15px;
text-decoration: none;
}
#si_but{
cursor: pointer;
}
答案 0 :(得分:1)
您的fileName = [lastAsset.creationDate.description substringWithRange:NSMakeRange(0, lastAsset.creationDate.description.length-6)];
NSString *tmp = [NSTemporaryDirectory() stringByAppendingPathComponent:fileName];
NSData *data = UIImageJPGRepresentation(result);
[data writeToFile:tmp atomically:YES]; // you might need UIImagePNGRepresentation here as well
[self.dropboxClient uploadFile:fileName toPath:destDir withParentRev:nil fromPath:tmp];
元素位于绝对位置,使其脱离正常的文档流,因此父元素<p>
不会&#34 ;见&#34; 他们。
我建议从#si
移除position: absolute;
并将其从.si_match
转换为<p>
。