html - CSS文件未在浏览器中更新
问题描述
只是在学习基本的编码技能,当我在 css 文件中进行更改时,这些更改不会显示在我的浏览器中。
这是我的 index.html 代码:
<html>
<head>
<link ref="stylesheet" href="css/style.css?v=1.1">
</head>
<body>
<div class="ios-switch">
<div class="switch-body">
<div class="toggle"></div>
</div>
<label>iOS Switch Practice</label>
<input type="checkbox" name="check box">
</div>
</body>
</html>
这是我的 style.css 文件:
*
{
margin:0;
padding:0;
}
.ios-switch{`enter code here`
display: flex;
flex-direction: row;
align-items: center;
margin: 10px 0;
}
.ios-switch .switch-body{
background-color: lightgray;
border: solid 1px gray;
width: 96px;
border-radius: 999px;
}
.ios-switch .switch-body .toggle{
width:48px;
height:48px;
background-color: white;
border-radius: 50%;
}
最后,当我在网上查找这个问题时,有人建议去谷歌浏览器中的开发者工具,我注意到有这个错误消息:
VM25:1047 WebSocket 连接到 'ws://localhost:8125/' 失败:连接建立错误:net::ERR_CONNECTION_REFUSED
非常感谢您的时间。
解决方案
转到 DeveloperTools (F12) 而不是设置 (F1),然后在网络首选项检查(禁用缓存(在 DevTools 打开时)-刷新页面
推荐阅读
- python - 如何组合熊猫数据透视表中的列?
- java - Spring 存储过程:org.springframework.dao.InvalidDataAccessApiUsageException
- google-cloud-stackdriver - 用于自定义服务指标的 GCP Operations Suite 监控和 SLI
- reactjs - Graphql apollo react 将状态传递给变量问题显示 [GraphQL 错误]:消息:NOT_A_NUMBER,位置:[object Object],路径:createSeller
- r - R 包目标 - 如何打开包含多个对象的 .RData 文件?
- node.js - NODE.JS 与 express 有很多路线
- laravel - 我怎样才能从多对多关系中只获得一些字段?
- regex - 正则表达式以匹配字符串的变体和左填充零
- php - 通过函数更新变量描述
- c# - 使用匹配和插值在数据表中查找查找值