html - Windows Phone 中的固定宽度视口(viewport)

标签 html css windows-phone-7 windows-phone-8 meta

我正在尝试在 Windows Phone 中使用固定宽度的视口(viewport)。它在 iOS 中运行良好,但由于某种原因在 Windows Phone 中无法运行,尽管我尝试了不同的解决方案(meta name=MobileOptimized@-ms-viewport 等.).

您可以在 http://oran.ge/PzWxHX 找到我的示例页面.

这是 iOS 中的引用渲染:http://grab.by/v8IM

CSS:

.bouton {
    display: block;
    width:75%;
    margin:auto;
    padding: 10px 0;
    background:#f60;
    color:#fff;
    font:bold 14px sans-serif;
    margin: 10px auto;
    text-align: center;
    text-decoration: none;
}

h2 {
    font:bold 14px sans-serif;
    margin: 15px auto;
    text-align: center;
    text-decoration: none;

}
.snippet {
    width:208px;
    height:326px;
    overflow:hidden;
    background:#ffb280;
}
.snippet h2 {
    font: 16px Arial, sans-serif;
    text-align:left;
    margin: 5px 0 15px;
}
.affiches, .sorties {
    width:250px;
}
.affiche, .sortie {
    width:93px;
    height:122px;
    float:left;
    margin: 0 22px 22px 0;
}
.sortie {
    height:62px;
    margin-bottom:40px;
}
@-ms-viewport{width:208px}
@viewport{width:208px}

HTML:

<body style="margin:0;padding:0">
<div class="snippet">
<h2>sorties de la semaine</h2>

<div class="affiches">
<a href="page2.html" class="bouton affiche" data-zone="cine" data-method="top/bbar"></a>
<a href="page2.html" class="bouton affiche" data-zone="cine" data-method="top/bbar"></a>
<a href="page2.html" class="bouton affiche" data-zone="cine" data-method="top/bbar"></a>
<a href="page2.html" class="bouton affiche" data-zone="cine" data-method="top/bbar"></a>
</div>
</div>

最佳答案

关于html - Windows Phone 中的固定宽度视口(viewport),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22403760/

相关文章:

html - 如何将文本居中放置在白色内?

silverlight - 如何从网络浏览器打开应用程序 Windows Phone

c# - WP7 从 BeginGetResponse 回调中传播异常

html - 从过渡继承的字体

html - 内联样式属性的 CSS 选择器

html - 问题在 div 中居中 ul 元素

php 错误地回显标签外的内容

javascript - jQuery .html() 并注入(inject)内联 CSS 样式?

html - 应用标签两次会导致不同的 css 样式

windows-phone-7 - 如何简单地在 wp7 中发出声音或蜂鸣声?