我在w3schools上使用的模态图像与此示例中的编码完全一致:
// Get the modal
var modal = document.getElementById('myModal');
// Get the image and insert it inside the modal - use its "alt" text as a caption
var img = document.getElementById('myImg');
var modalImg = document.getElementById("img01");
var captionText = document.getElementById("caption");
img.onclick = function(){
modal.style.display = "block";
modalImg.src = this.src;
captionText.innerHTML = this.alt;
}
// Get the <span> element that closes the modal
var span = document.getElementsByClassName("close")[0];
// When the user clicks on <span> (x), close the modal
span.onclick = function() { …Run Code Online (Sandbox Code Playgroud)StackOverflow 有什么好的?我长期以来一直试图弄清楚为什么 Gmail 没有接收我的 HTML 电子邮件的媒体查询。宽屏看起来不错,但 Gmail 不响应我手机的屏幕宽度,因此在手机上看起来很奇怪且有问题。
我已经尝试过查看类似的问题,甚至尝试重写我的 CSS 多次,看看媒体查询是否会接受哪怕是最小的更改。
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width ,initial-scale=1" />
<style type="text/css">
@import url('https://fonts.googleapis.com/css?family=Libre+Baskerville');
body {
margin: 0;
padding: 15px;
}
.center {
text-align: center;
margin: 0 auto;
}
.wrapper {
width: 100%;
table-layout: fixed;
}
.inner-wrapper {
width: 100%;
max-width: 670px;
background: #554348;
margin: 0 auto;
}
table {
border-spacing: 0;
font-family: sans-serif;
color: #727f80;
}
.header-table {
text-align: center;
padding: 10px 0px 0 0; …Run Code Online (Sandbox Code Playgroud) 我的安装的当前结构

我必须在 azure 中重新启动应用程序网关