我使用 bootstrap 4.1 卡片在右侧边栏上显示内部类别 -卡片示例图像;
在小屏幕上我想折叠它card,因为它很大并且首先是移动示例。
所以,我怎么能在崩溃卡sm和md屏幕,并在不倒闭lg的屏幕?或者我不需要使用card?
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<div class="container">
<div class="card mb-3">
<h5 class="card-header">Categories</h5>
<div class="card-body">
<h5><a href="http://rtss2.loc/info">All</a></h5>
Categories here
</div>
</div>
</div>Run Code Online (Sandbox Code Playgroud)
我有两个id数组:
let a = [1, 7, 8];
let b = [1, 7, 99];
Run Code Online (Sandbox Code Playgroud)
我想合并它们并切断常见值.结果必须如下:
let res = [8, 99];
Run Code Online (Sandbox Code Playgroud)
每个数组(a或b)都不能有重复项.接下来是不可能的
let a = [1, 1, 7, 8];
let b = [1, 7, 7, 99, 7];
Run Code Online (Sandbox Code Playgroud)
我该如何合并和切换?我可以合并这种方式而不重复,但这不是我想要的.
[...new Set([...a, ...b])]; // [1, 7, 8, 99]
Run Code Online (Sandbox Code Playgroud) 我有里面template.docx有标记的模板${table}。我需要使用phpWord创建表,并在我的插入template.docx,而不是${table}标记内。这是我的代码示例
//Create simple table
$document_with_table = new PhpWord();
$section = $document_with_table->addSection();
$table = $section->addTable();
for ($r = 1; $r <= 8; $r++) {
$table->addRow();
for ($c = 1; $c <= 5; $c++) {
$table->addCell(1750)->addText("Row {$r}, Cell {$c}");
}
}
//Open template with ${table}
$template_document = new \PhpOffice\PhpWord\TemplateProcessor('template.docx');
// some code to replace ${table} with table from $document_with_table
// ???
//save template with table
$template_document->saveAs('template_with_table.docx');
Run Code Online (Sandbox Code Playgroud)
首先,我$document_with_table使用新的 PhpWord 实例在单独的变量中创建表。接下来我加载我的template.docxin$template_document …