[英]Any ideas why this code won't work? body > *
I am using jqtouch to make a mobile website. 我正在使用jqtouch制作移动网站。 I am also implementing a gallery image slider within the website, however when the gallery is put where I need it (inbetween
<div id="project_name" class="page"></div>
, the images won't display. 我还在网站中实现了画廊图像滑块,但是当画廊放在我需要的位置时(在
<div id="project_name" class="page"></div>
,图像将不会显示。
After tinkering for hours, removing display: none; 修补了几个小时后,移除显示内容:无; from jqtouch.css rule:
来自jqtouch.css规则:
body > * {
-webkit-backface-visibility: hidden;
-webkit-box-sizing: border-box;
display: none;
position: absolute;
left: 0;
width: 100%;
-webkit-transform: translate3d(0,0,0) rotate(0) scale(1);
min-height: 420px !important;
}
Makes the gallery work, but obviously means the website doesn't work. 使画廊正常工作,但显然意味着网站无法正常工作。 Any ideas why this is happening, what body > * does and how I can get over it?
有什么想法为什么会发生这种情况,什么机构> *以及如何克服它?
Project is at http://djrb.co.uk/mobile/portfolio.php#home 该项目位于http://djrb.co.uk/mobile/portfolio.php#home
Many thanks, 非常感谢,
Rich 丰富
The selector body > *
matches any element that is a child of body
. 选择器
body > *
匹配任何body
子元素。 The right-angle bracket is the child selector . 直角括号是子选择器 。 The star matches any element .
星星与任何元素匹配 。
You probably want to include a more specific selector for your gallery div
and apply the appropriate styles in a separate declaration block. 您可能希望为图库
div
包括一个更特定的选择器,并在单独的声明块中应用适当的样式。 Something like this: 像这样:
#project_name {
/* properties */
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.