相关疑难解决方法(0)

HTML中不需要P-end-tag(</ p>)

</p>仅在XHTML中需要,但在HTML中不需要.有时你必须关闭它,例如当您将段落左/右/中心对齐时.

混合使用</p>如下所示是一个坏主意?请注意,</p>第1段和第3段中没有结束标记.

<h1>My article</h1>
<p>This is my 1st paragraph.
<p class="align=right">This is my 2nd paragraph</p>
<p>This is my 3rd paragraph.
Run Code Online (Sandbox Code Playgroud)

我不想关闭P标签的原因:

  • 易于在我的CMS中使用(要求更高的代码使其成为XHTML)
  • 1kb打火机文件

html paragraph

26
推荐指数
2
解决办法
3万
查看次数

display:flex无法在Internet Explorer上运行

我的flex容器:

.back_pattern {
    display: flex;
    display: -ms-flexbox;
    -ms-flex-pack: center;
    flex-direction: column;
    align-content: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}
Run Code Online (Sandbox Code Playgroud)

在其他浏览器上一切正常.
ie11:http://take.ms/68dHo ;
chrome:http://take.ms/JhcEH有
什么问题?

html css flexbox

11
推荐指数
1
解决办法
7万
查看次数

在 Internet Explorer 中包含 100% 宽度图像的 flex 子框的高度不正确

我使用Chris 的 Coyer 方法使页脚粘在页面底部。

HTML

<div class="container">
  <div class="content-box">
    <div class="image-box">
      <img src="https://i.stack.imgur.com/XIQ2T.jpg">
    </div>
  </div>
  <div class="bottom-box">Bottom</div>
</div>
Run Code Online (Sandbox Code Playgroud)

CSS:

.container {
  display: flex;
  flex-direction: column;
  height: 100vh; /* Avoid the IE 10-11 `min-height` bug. */
}
.bottom-box {
  flex-shrink: 0; /* Prevent Chrome, Opera, and Safari from letting these items shrink to smaller than their content's default minimum size. */  
  background: #069;
  color: #fff;
  line-height: 3;
}
.content-box {
  flex: 1 0 auto; /* Prevent Chrome, Opera, and …
Run Code Online (Sandbox Code Playgroud)

html css flexbox internet-explorer-11

5
推荐指数
1
解决办法
1194
查看次数

标签 统计

html ×3

css ×2

flexbox ×2

internet-explorer-11 ×1

paragraph ×1