这与这篇文章中提出的问题非常相似,但该文章似乎不适用于 GitHub 的解析 Markdown。
简而言之,假设我在 GitHub 存储库中有一个 PDF。有没有什么方法可以将其渲染/嵌入到存储库中的 markdown 文件(例如文件README.md
)中?
我也愿意将 PDF 放在 GitHub 以外的位置,并从 Markdown 文件链接到它(如果这是完成这项工作所需的条件)。
本质上,我试图删除/防止当块元素的水平行包裹任何块元素时创建的额外水平宽度。也就是说,我希望div
包含溢出元素的宽度恰好是非包装元素的大小。
可以使用以下代码查看有问题的问题:
<!-- index.html -->
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="example.css">
</head>
<body>
<div class="card">
<div class="card-content">
<div>
<div class="row">
<p class="note-title">This is a relatively lengthy example title for example purposes.</p>
<div>
<div class="row">
<div class="note-tags-list">
<p id="blank-tag">.</p>
<p class="tag note-tag">crunchy</p>
<p class="tag note-tag">recipe</p>
<p class="tag note-tag">carrot</p>
</div>
<p id="text-that-should-stay">I stay</p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
Run Code Online (Sandbox Code Playgroud)
/* example.css */
@import "https://cdn.jsdelivr.net/npm/bulma@0.9.3/css/bulma.min.css";
#text-that-should-stay {
white-space: nowrap;
color: white;
}
#blank-tag {
width: 30px;
min-width: 30px; …
Run Code Online (Sandbox Code Playgroud)