小编weB*_*Ber的帖子

VS Code 多语言突出显示在一个文件中用于不同语言

首先,几天前我刚刚迁移到VS Code for Sublime Text 。

我想要的是一种语言扩展中的多语言荧光笔。

例如:我想突出显示、和文件内的正确结束标签HTMLPHPJavascript.php

我能找到的唯一方法是在设置中添加以下代码:

"files.associations": {
        "*.php":"html, php"
 }
Run Code Online (Sandbox Code Playgroud)

当我尝试此操作时,该.php文件仅突出显示HTML语法。

那么是否有任何扩展或任何其他方式来实现我想要的结果?

editor visual-studio-code vscode-extensions vscode-tasks

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

仅为最后一页修复了PRINT粘滞页脚

我所拥有的是<table>它有时可能只在一个页面上,有时它可能会增长到10页左右.

这是一个示例代码:

div{
  position:relative;
  height:100vh;
}

.table-blue{
  width:100%;
  background:lightblue;
}

.table-blue td{
  padding:5px 10px;
}

.table-blue-fotter{
    position: absolute;
    bottom: 20px;/* for bottom gap */
    left: 0px;
    width:100%;
    background:gray;
}


@media print {
 .table-blue-fotter{
    position: fixed;
    bottom: 20px;
    left:0px;
    width:100%;
    background:gray;
}
Run Code Online (Sandbox Code Playgroud)
<div>
<table class="table-blue">
  <tr>
    <td>one</td>
    <td>one test</td>
  </tr>
  <tr>
    <td>two</td>
    <td>two test</td>
  </tr>
  <tr>
    <td>three</td>
    <td>three test</td>
  </tr>
</table>

<table class="table-blue-fotter">
  <tr>
    <td>one</td>
    <td>one test</td>
    <td>one test</td>
  </tr>
  <tr>
    <td>two</td>
    <td>two test</td>
    <td>one …
Run Code Online (Sandbox Code Playgroud)

css printing html-table stylesheet css3

7
推荐指数
2
解决办法
3098
查看次数

设置子项的宽度以填充父项

我想要div填充它的宽度的孩子。

现在正在使用这样的代码:

.parent {
  width: 100%;
  display: inline-block;
  height: 120px;
  background: #000;
  padding: 10px;
  box-sizing: border-box;
}

.child {
  display: inline-block;
  margin-left: 1%;
  width: 31.4%;
  height: 100px;
  background: #ddd;
}
Run Code Online (Sandbox Code Playgroud)
<div class="parent">
  <div class="child"></div>
  <div class="child"></div>
  <div class="child"></div>
</div>
Run Code Online (Sandbox Code Playgroud)

并且它正在工作3 boxes,但我想要的是 - 即使框数是one或者two我希望它们填充父宽度。我想仅使用CSS来实现这一点。

css parent-child flexbox

6
推荐指数
1
解决办法
2万
查看次数

如何使用单路径绘制 SVG 曲线?

我想要的是下图- 在此处输入图片说明

我对此有 3 个相关问题

1.我们可以用single path.绘制整个画布吗?

2.如果我们只能用一个以上的路径绘制整体,给它们动画会方便吗?

3.在这两种情况下,任何人都可以用样本指导正确的方法吗?

这就是我到目前为止所得到的......正如你所看到的,我不是专家SVG,当然,你可以用一个圆圈来表示大点。先感谢您。

svg {
  width: 100%;
}

.straightLine {
  height: 3000px;
  position: relative;
}

.st0 {
  fill: none;
  stroke-dashoffset: 3px;
  stroke: #000000;
  stroke-width: 5;
  stroke-miterlimit: 10;
}
Run Code Online (Sandbox Code Playgroud)
<div class="straightLine">
  <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1280 1000" style="enable-background:new 0 0 1280 800;" xml:space="preserve">
	<g class="all">
	<path id="line1" class="st0" stroke-dasharray="10,9" d="M 35 -17 C 0 190 50 83 600 109 "/>
	<path id="line1" class="st0" stroke-dasharray="10,9" …
Run Code Online (Sandbox Code Playgroud)

css svg svg-animate

6
推荐指数
1
解决办法
2163
查看次数

将文本限制为容器宽度并保持居中样式

我想创建一个像这个例子的about页面

我想我差不多了,我有一个响应容器,有4个人

#about {
  background: #ffffff;
}

#aboutHeader {
  text-align: center;
}

#members {
  display: flex;
  flex-wrap: wrap;
}

#aboutAttracting {
  text-align: center;
  margin-top: 70px;
}

.memberContainer {
  width: 50%;
  display: flex;
  margin-top: 50px;
}

.memberFocus {
  width: 70%;
}

.sectionHeader {
  margin-bottom: 70px;
}

.section {
  padding: 100px 200px;
}

@media(max-width: 1200px) {
  .section {
    padding: 80px 150px;
  }
  .memberFocus {
    width: 80%;
  }
}

@media(max-width: 1100px) {
  .memberFocus {
    width: 90%;
  }
}

@media(max-width: 1000px) { …
Run Code Online (Sandbox Code Playgroud)

html css

6
推荐指数
1
解决办法
90
查看次数

按钮内的图像动画

我是这个编码领域的新手,我认为我的问题很简单,对于像你们这些人一样有经验的人.我正在尝试为按钮内部的图像设置动画.当我点击按钮时,我需要将图像旋转360度.我不知道我在做什么错误是我的HTML和CSS代码.请帮忙

.syncRotate {
  -webkit-transition: 500ms ease all !important;
  -moz-transition: 500ms ease all !important;
  -o-transition: 500ms ease all !important;
  transition: 500ms ease all !important;
  -webkit-transform: rotate(360deg) !important;
}
Run Code Online (Sandbox Code Playgroud)
<button class="iconBtn" mdTooltipPosition="above" mdTooltip="Sync User" (click)="sync()">
    <img class="syncRotate" style="width:20px;background-color: #a6a6a6;border-radius: 13px;padding:2px;" src="../../assets/images/icons/sync.svg" alt="Sync">
</button>
Run Code Online (Sandbox Code Playgroud)

html css typescript angular2-template

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

断字的替代:断字

是否有替代word-break: break-word在Firefox的作品?

在Firefox中[版本57.0]

在此处输入图片说明

在Chrome中[版本62.0.3202.94]

在此处输入图片说明

break-word在firefox中也有使用属性的方法或替代方法吗?[ 如果它在较旧的版本中有效,那就更好了。]

样例代码

table {
  width: 300px;
  display: inline-block;
  overflow: hidden;
  word-break: break-word;
}

.text-right {
  width: 30%;
}
Run Code Online (Sandbox Code Playgroud)
<table>
  <tr>
    <td class="text-right">Sample text </td>
    <td>Sample texttexttexttexttexttexttexttext 000000000000000000000000000000</td>
  </tr>
</table>
Run Code Online (Sandbox Code Playgroud)

css css3 word-break

5
推荐指数
2
解决办法
3517
查看次数

Bootstrap标签输入不显示标签

我正在努力让bootstrap标签输入工作,但我看不出我做错了什么.据我所知,我甚至按照这篇文章中的步骤如何使用Bootstrap Tags Input插件

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css" integrity="sha384-Zug+QiDoJOrZ5t4lssLdxGhVrurbmBWopoEl+M6BdEfwnCJZtKxi1KgxUyJq13dy" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.css" crossorigin="anonymous">

<form>
  <div class="form-group row">
    <label for="name" class="col-sm-2 col-form-label">Name</label>
    <div class="col-sm-10">
      <input type="text" class="form-control col-sm-12" value="" data-role="tagsinput" id="tags">
    </div>
  </div>
</form>

<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/js/bootstrap.min.js" integrity="sha384-a5N7Y/aK3qNeh15eJKGWxsqtnX/wWdSZSKp+81YjTmS15nvnvxKHuzaWwXHDli+4" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tagsinput/0.8.0/bootstrap-tagsinput.min.js" crossorigin="anonymous"></script>
Run Code Online (Sandbox Code Playgroud)

我看到两件奇怪的事情:

1)标签出现在DOM中,但似乎没有应用任何类型的背景,因此它们看起来不可见.但我无法看到任何需要在文档中指定默认颜色的提及.

2)控件似乎调整了自己的大小,因为你正在打字并放入我不理解的标签,因为它应该有固定的大小.

有谁知道我在这里做错了什么?显然我可以添加一些CSS黑客来显示标签,但我的理解是它应该只是解决方案?

html javascript css css3 twitter-bootstrap

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

使滚动增长<path>变为虚线

这是我迄今为止在stackoverfow本身的朋友的帮助下所做的.

它工作正常,但我想做一个对我来说有点复杂的动画.

// Get the id of the <path> element and the length of <path>
var myline = document.getElementById("myline");
var length = myline.getTotalLength();
circle = document.getElementById("circle");
// The start position of the drawing
myline.style.strokeDasharray = length;

// Hide the triangle by offsetting dash. Remove this line to show the triangle before scroll draw
myline.style.strokeDashoffset = length;

// Find scroll percentage on scroll (using cross-browser properties), and offset dash same amount as percentage scrolled
window.addEventListener("scroll", myFunction);

function myFunction() { …
Run Code Online (Sandbox Code Playgroud)

javascript css jquery svg svg-animate

4
推荐指数
1
解决办法
1510
查看次数

打印预览中不显示背景图像

我正在使用 laravel 5.4,但在打印预览中不显示。该怎么办..?

.bg {
  @media print {
    visibility: visible;
    /* The image used */
    background-image: url("../logo/back_id_card.JPG");
    /* Full height */
    height: 100%;
    /* Center and scale the image nicely */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    -webkit-print-color-adjust: exact;
  }
}
Run Code Online (Sandbox Code Playgroud)

css

4
推荐指数
1
解决办法
6289
查看次数