- objective-c - iOS 5 : Can you override UIAppearance customisations in specific classes?
- iphone - 如何将 CGFontRef 转换为 UIFont?
- ios - 以编程方式关闭标记的信息窗口 google maps iOS
- ios - Xcode 5 - 尝试验证存档时出现 "No application records were found"
我想在默认 WordPress 主题 ( http://twentyelevendemo.wordpress.com/ ) 中的标题中的照片上方放置一个 Logo
我的解决方案:在照片前添加标志,并在其上设置position: absolute
,不设置任何top/left/bottom/right
属性:
HTML:
<a id="header">
<img id="logo">
<img id="photo">
</a>
CSS:
#logo {
position: absolute;
margin: 10px;
/* or padding: 10px; */
/* or border: 10px solid transparent;
only this works with my elderly iPhone Simulator.app */
}
另一个例子是水平多级菜单,它是 100% 宽的,用 display: table-*
布局,但是 table-cell
不支持position: relative
,所以我唯一的解决方案是:http://jsfiddle.net/pCe49/
它适用于 IE6-7、Firefox1.5,不适用于 Firefox 0.8 等。
您认为这是一个好的解决方案,还是一个随时可能崩溃的非标准 hack?
最佳答案
标准通常说如果顶部/底部、左侧/右侧是自动的,则将它们默认为它们的position: static
值:
http://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-width
http://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-height
关于css - 位置 : absolute without setting top/left/bottom/right?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10243991/
我想显示一个评论列表以及每个评论的评论列表等等: 这是我的 HTML 代码: Titre d'un commentaire statique Qui cum ven
据我了解,position: absolute 对于具有非静态位置的第一个父级是绝对的。如果没有 parent 有指定的位置,那么它将是浏览器/窗口的绝对位置。 position: fixed 另一方
我有 3 个 div,每个 div 都有以下 CSS。 .d1 { position: relative; background-color: yellow; height:
我对此很困惑,你可以看到它适用于 pos: absolute; 但不适用于 position: absolute; 这是什么意思? https://jsfiddle.net/aasr169k/ #ab
我有以下html CSS .banner_area_interna
我的“header_main”绝对定位,高度为 100%,基本上覆盖了整个屏幕。在 header_main div n 内还有另一个绝对定位的 div。我已将“icon-wrapper”div 设置为
最近,我们的主要网站进行了 UI 重新设计 - 新导航/页脚等。主网站(有自己的用户界面 - 导航/页脚等)托管在主页面中调用的其他 html 页面。 在重新设计之前,每当我们创建 html 页面(用
document_name ='TestDoc' document_path = ("/Users/Me/QA/Project/Documents/#{document_name}") File.ne
我希望能够将任何操作系统上主目录中的某个目录转换为该操作系统上的实际绝对路径,例如(make-pathname :directory '(:absolute :home "directoryiwant
HTML CSS div1、div2 和 div3 的属性是: div1. { position: absolute; z-index: 100; background
我有几个与 OpenFeign 相互通信的微服务.每个都是一个项目的子模块(称为“父”),具有自己的 docker 容器。 好的。所以,当我想用 feign.builder().target()
多年来,Visual Studio.NET 为 ASP.NET 提供了“绝对定位”,您可以借此将控件拖动到设计器 Canvas 上您想要的任何位置。但是,一直强烈建议不要使用该功能。相反,常识告诉您应
在浏览器窗口中水平居中元素(div,但那不是重点)时出现问题。与其父元素相比定位它没有问题,但希望它摆脱这个 HORIZONTALLY - 但仍然保持与它的垂直关系。也许我要求太多了? :-) 我可以
我试图在根元素内放置一个内部元素。根元素设置为 100% 高和 100% 宽。但是,我希望内部 svg 与外部 svg 的边缘相距 10 像素左右——除了右边缘,我希望与外右边缘相距 200 像素。我
我的nant脚本(Team City)中有一个msdeploy,它正在工作,但它正在复制一些我不想复制的文件夹。什么命令将跳过这些目录?我试过了: and 这些命令似乎都不起作用,并且Build
我在我网站的某个部分挂了一条功能区的以下 css http://www.tonypalazzo.com . .ribbon { float:left; padding:5px 0 0
我正在尝试重新创建 OOCSS media object为了在某些文本旁边显示图像。媒体对象使用 overflow: hidden 创建一个新的 block 格式化上下文。这可确保文本不会环绕图像
/codepen 链接曾经在这里/ 当我没有给我的主页脚指定位置时,段落元素与根元素无关。为什么它与我的 .banner 元素有关?这不是它的祖先。这是一个错误吗? .main-footer { /
fiddle 在div重叠的简单情况下 first second CSS:- #second { margin-top: -18px; background:
以下来自this问题的最佳答案 Absolute CSS Positioning position: absolute; This tells the browser that whatever is
我是一名优秀的程序员,十分优秀!