我将Windows 10升级到昨天的最后一次更新,现在,当我启动 vagrant up命令时出现此错误:
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
The guest machine entered an invalid state while waiting for it
to boot. Valid states are 'starting, running'. The machine is in the
'poweroff' state. Please verify everything is configured
properly and try again.
If the provider you're using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since …Run Code Online (Sandbox Code Playgroud) 为什么谷歌浏览器在用3次鼠标点击选择文本时总是在行末添加空格?
您认为我们可以使用CSS或JavaScript来删除它吗?(不好主意,但只是试图避免这件事)
块:
当我在文本上单击3次时:
一个gif例子:
<body>
<div>
<h1>Example Domain</h1>
<p>This domain is established to be used for illustrative examples in documents. You may use this
domain in examples without prior coordination or asking for permission.</p>
<p><a href="http://www.iana.org/domains/example">More information...</a></p>
</div>
</body>
Run Code Online (Sandbox Code Playgroud) 尝试使用文件设置故事书.scss。
遵循文档>
// .storybook/main.js
const path = require('path');
// Export a function. Accept the base config as the only param.
module.exports = {
webpackFinal: async (config, { configType }) => {
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
// You can change the configuration based on that.
// 'PRODUCTION' is used when building the static version of storybook.
// Make whatever fine-grained changes you need
config.module.rules.push({
test: /\.scss$/,
use: ['style-loader', 'css-loader', 'sass-loader'],
include: path.resolve(__dirname, …Run Code Online (Sandbox Code Playgroud) 我尝试构建具有最佳性能的Angular应用。
这个程序很简单:
一个页眉(带有两个链接),一个页脚,主页和关于页面。
该应用程序在这里可用
我使用Chrome的LightHouse查看指标。
使用默认指标:
Device: Mobile
Audits: All
Throttling: Simulated Slow 4G, 4X CPU Slowdown
Clear Storage
Run Code Online (Sandbox Code Playgroud)
在此之后,我使用Nginx代理通过gzip提供所有资产。
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_types text/plain application/json text/xml text/css text/js text/javascript application/javascript image/svg+xml;
gzip_min_length 1000;
Run Code Online (Sandbox Code Playgroud)
当然,这还不错,但是我想看看Angular是否有可能使First Input Delay小于100ms。
如果我删除了清除存储参数,则会出现以下情况。
如果我不输入任何节流参数,我将处于下面。
但是我想使用这些参数将其设置为100ms以下。因此,当我在生产环境中构建产品时,可能会错过一些参数,该项目基于Angular SSR hero应用程序。
我看到当我呈现不带JS文件的网站时,只要没有javascript交互并且我在First输入交互中的时间为20毫秒,它仍然可以正常工作,因此也许有一种方法可以不同地加载JS脚本。它正在使用> = 1500ms的超时,但这不是一个好习惯。
我想知道Angular SSR是否可以使用<100ms的首次输入时间延迟来渲染,或者该堆栈是否实际无法渲染。
我了解LightHouse审核是基于您的计算机性能。我使用Pagespeed洞察力获得了几乎相同的结果 ,但由于服务器性能较弱,速度索引和第一个字节的到达时间除外。
Github项目:https : //github.com/mlescaudron/angular-app-optimized
还有要在本地测试的命令:
# Docker config for nginx with gzip compression
docker run -d --name web-server --network=host …Run Code Online (Sandbox Code Playgroud) 如何在 Javascript 中捕获在我的网站中从 Lighthouse 运行审计的用户?
出于好奇,我想看看是否有可能。
编辑:
基于@DBS 的回答,我想看看如果我能在这个过程中抓住它
<script>
if (navigator.userAgent.indexOf("Chrome-Lighthouse") > -1) {
document.body.innerHTML = "Lighthouse!";
} else {
document.body.innerHTML = "No lighthouse :("
}
</script>
Run Code Online (Sandbox Code Playgroud)
我从 Windows 8 升级到 Windows 10,我已经解决了这个 github 问题的很多问题:https : //laracasts.com/discuss/channels/general-discussion/windows-10-vagrant-virtualbox-homestead
但是当我打电话时vagrant up,vagrant 说:
vagrant requested NFS version or transport protocol is not supported
Run Code Online (Sandbox Code Playgroud)
我的流浪文件:
config.vm.synced_folder "data", "/vagrant", type:"nfs"
Run Code Online (Sandbox Code Playgroud)
当我删除类型:“nfs”时,它可以工作,但我需要它来加速我的虚拟机....
有任何想法吗?
我想删除div一个伟大的动画,但我不知道如何做到这一点.
所以我以小提琴为例:
<h2>What I have</h2>
<div class='test'>1</div>
<div class='test'>2</div>
<div class='test'>3</div>
<div class='test'>4</div>
<div class='test'>5</div>
<h2>What I Want</h2>
<div class='test2'>1</div>
<div class='test2'>2</div>
<div class='test2'>3</div>
<div class='test2'>4</div>
<div class='test2'>5</div>
Run Code Online (Sandbox Code Playgroud)
div.test, div.test2 {
display:inline-block;
padding: 20px;
margin:5px;
border:1px solid black;
-webkit-transition: all .5s;
-moz-transition: all .5s;
-ms-transition: all .5s;
-o-transition: all .5s;
transition: all .5s;
}
Run Code Online (Sandbox Code Playgroud)
$('div.test').on('click', function() {
$(this).remove();
});
$('div.test2').on('click', function() {
// I don't want to change opacity or padding...
// I …Run Code Online (Sandbox Code Playgroud) javascript ×5
windows-10 ×3
css ×2
vagrant ×2
virtualbox ×2
angular ×1
angular8 ×1
browser ×1
jquery ×1
node.js ×1
pagespeed ×1
reactjs ×1
sass ×1
sass-loader ×1
storybook ×1