- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我试图在我的网站中实现灵活的盒子模型,虽然它适用于 chrome 和 safari 等 -webkit 浏览器,其他浏览器如 mozilla 和 opera,但我似乎无法让它在 Internet Explorer 中工作,不不管我做什么。这是我的 Css 样式表文件的一小段,其中包含包含所有内容的 .holder 类,以及我的 #new_div id,它是 .holder 的子项,包含我的帖子和侧边栏的主要部分。
.holder
{
width:100%;
margin:auto;
display:-webkit-box;
display:-o-box;
display:-ms-box;
display:-box;
display:-pie;
-webkit-box-orient:vertical;
-moz-box-orient:vertical;
-o-box-orient:vertical;
-ms-box-orient:vertical;
-box-orient:vertical;
-pie-box-orient:vertical;
-moz-box-flex:1; /* Firefox, seamonkey etc */
-o-box-flex:1; /* Opera */
-ms-box-flex:1; /* MSIE */
-box-flex:1; /* Any that support full implementation */
-pie-box-flex:1;
-webkit-box-flex:1;
-webkit-box-pack:center;
-o-box-pack:center;
-ms-box-pack:center;
-pie-box-pack:center;
-box-pack:center;
text-align:center;
behavior: url(../../Content/pie/PIE.htc);
}
.holder #new_div
{
width:940px;
}
.holder div
{
-webkit-box-pack:center;
-o-box-pack:center;
-ms-box-pack:center;
-box-pack:center;
-pie-box-pack:center;
behavior: url(../../Content/pie/PIE.htc);
}
#new_div
{
margin:auto;
display:-webkit-box;
display:-moz-box;
display:-o-box;
display:-ms-box;
display:-box;
display:-pie-box;
text-align:left;
-webkit-box-flex:1;
-moz-box-flex:1; /* Firefox, seamonkey etc */
-o-box-flex:1; /* Opera */
-ms-box-flex:1; /* MSIE */
-box-flex:1;
-pie-box:1;
-webkit-box-pack:center;
-box-pack:center;
-moz-box-pack:center;
-o-box-pack:center;
-ms-box-pack:center;
-pie-box-pack:center;
background-color:#25282D;
-webkit-box-orient:horizontal;
-moz-box-orient:horizontal;
-o-box-orient:horizontal;
-ms-box-orient:horizontal;
-box-orient:horizontal;
-pie-box-orient:horizontal;
min-width:940px;
padding:20px;
behavior: url(../../Content/pie/PIE.htc);
}
在那里你可以看到我在其他定义旁边定义了 -ms-box-.. 名称,但它似乎仍然没有注册。我尝试过绝望地使用 CSS3Pie 库,尽管那没有用,尝试为 IE 安装 Chrome 插件,尽管也失败了,我只是不知道该怎么做。也许我已经写过的 css 可能存在语法问题,但正如我所说,它在其他浏览器中运行良好。有什么建议或提示吗?
最佳答案
IE 不使用 deprecated 2009 Flexbox properties ,它使用了已弃用的 March 2012 draft 中的那些. Opera 支持 Flexbox standard没有前缀的属性和 -webkit- 前缀下的 2009 属性。
.holder {
width: 100%;
margin: auto;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-webkit-box-direction: normal;
-moz-box-direction: normal;
-webkit-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-flex: 1;
-moz-box-flex: 1;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
-webkit-box-pack: center;
-moz-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
text-align: center;
}
.holder #new_div {
width: 940px;
}
.holder div {
/* justify-content does nothing here since this element isn't a flex container */
-webkit-box-pack: center;
-moz-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
}
#new_div {
margin: auto;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
text-align: left;
-webkit-box-flex: 1;
-moz-box-flex: 1;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
-webkit-box-pack: center;
-moz-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
/* this shouldn't be necessary, as the default direction is `row` */
-webkit-box-orient: horizontal;
-moz-box-orient: horizontal;
-webkit-box-direction: normal;
-moz-box-direction: normal;
-webkit-flex-direction: row;
-ms-flex-direction: row;
flex-direction: row;
min-width: 940px;
padding: 20px;
}
另外值得注意的是,这需要IE10+
关于css - IE 灵活的盒子模型不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16487884/
这个问题在这里已经有了答案: CSS3 Flexbox: display: box vs. flexbox vs. flex (3 个答案) 关闭 1 年前。 今天我们中的许多人都知道 displa
$('.finalLink').html(" Click to Follow"); 我正在尝试创建一个以 super 框模式打开的链接。尝试了灯箱,结果相同。这些链接有效,但只是转到该网站。如果我静态
我使用了 RayHandler.useDiffuseLight(true) ,现在无论我设置什么环境光值,屏幕上未照亮的部分都是黑色的。这是正常的吗?我见过其他用 libgdx 制作的应用程序,它同时
我需要帮助解决一个简单的问题。我的任务即将结束,我们要制作不同的艺术人物。我制作了一个“正方形内的正方形”盒子,需要生成该盒子的 4 行和 4 列。 我认为最好的解决方案是多一些 for 循环,但不能
我怎样才能实现this effect使用 CSS 和/或 jQuery? 我会发布到目前为止我编写的代码,但它没有用...... 最佳答案 使用jQuery Masonry或Isotope为了达成这个
我写了下面的代码: for row in range(len(listOfLists)): print('+' + '-+'*len(listOfLists)) print('|',
我想知道如何在 CSS3 中制作成 Angular 盒子。喜欢这个网站: http://themeluxe.com/themes/glissando/ (白人) 我怎样才能使边框看起来更好、更平滑。
我正在尝试实现具有三个垂直部分的简单布局: 页面顶部的小标题。 主要内容,必要时展开,以便页脚保留在页面底部。 页面底部的页脚。 主要内容部分应进一步分为两部分:一个带有输入框和按钮的非常小的表单,以
我正在尝试构建如下图所示的网格 IMG 链接:http://postimg.org/image/qo3b4nof1/ 但我得到的 DIV E 几乎在 D-DIV 旁边 这是我的代码
如何修改fancybox盒子的定位?我希望它被定位,以便它漂浮在我的容器 div 中... 感谢您的宝贵时间和帮助! 最佳答案 jquery.fancybox-1.2.6 的第 255 行有这段代码
这个问题在这里已经有了答案: Inset border-radius with CSS3 (8 个答案) 关闭 9 年前。 border-radius 属性可以使盒子的 Angular 变圆。但是如
我创建了一个包装器元素,其中包含 2 个彼此相邻的行内 block 框(图片中为浅绿色和黄色)。然后我创建了另外两个 div,它们都嵌套在其中一个内联 block 中以使内容居中。它可以工作,但由于某
我在使用 WordPress 时遇到问题,在盒子中嵌套盒子。在 WordPress 之外,这工作正常。我确定只有一两个参数有误。 外框为dp23,内框为dp22由于某种原因,内框 (dp22) 之间存
我目前尝试在容器内排列盒子的结果是这样的输出。 但我想要实现的是, 用最大数量的框填充每一行,但每个框都有固定的填充和边距。我相信我已经做到了。 我需要每行中的单个框来覆盖剩余空间,间隙仅为 1 像素
我在下面有多个 flexbox 的代码。当页面展开时,我如何将它们垂直居中放置在页面中?我尝试在我的 flex-container 中使用 justify-content: center; 但当我使用
我有这样的布局: 我
我是编程新手,我注意到有人提到了 flex box。在阅读了很多相关内容之后,它似乎对我有用。唯一的问题是我在安装它时遇到了很多麻烦,即使在搜索了大约一个小时的帮助之后也是如此。我从 github 下
Vagrantfile有问题: # -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config
我正在尝试下载一个 Vagrant 的盒子,但他们的服务器此时非常缓慢。他们有公共(public)镜子吗?我想下载precision64.box 文件。 谢谢 最佳答案 尝试更可靠的: Vagrant
在一个父容器内,三个 div 彼此重叠。顶部 div 是固定高度。底部 div 的内容占用了未知数量的垂直空间,但需要显示其中的所有内容。顶部 div 应填充剩余的垂直空间。每一个 // 100%
我是一名优秀的程序员,十分优秀!