小编Tan*_*rad的帖子

不用Javascript制作模式

如何在没有 javascript 代码的情况下仅使用 html 和 css 制作模式?

我有一个项目,我不能使用 javascript,我需要模态。

<!DOCTYPE html>
<html>
<title>W3.CSS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<body>

<div class="w3-container">
  <h2>W3.CSS Modal</h2>
  <button onclick="document.getElementById('id01').style.display='block'" class="w3-button w3-black">Open Modal</button>

  <div id="id01" class="w3-modal">
    <div class="w3-modal-content">
      <div class="w3-container">
        <span onclick="document.getElementById('id01').style.display='none'" class="w3-button w3-display-topright">&times;</span>
        <p>Some text. Some text. Some text.</p>
        <p>Some text. Some text. Some text.</p>
      </div>
    </div>
  </div>
</div>

</body>
</html>
Run Code Online (Sandbox Code Playgroud)

html css

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

traverse.clearCache不是函数

https://babeljs.io/中,当我想编译我的ES6代码时,将显示此错误:

traverse.clearCache is not a function
Run Code Online (Sandbox Code Playgroud)

我的代码是一个简单的代码,例如:let i = 1;

console.log(i)
Run Code Online (Sandbox Code Playgroud)

javascript babel ecmascript-6 babeljs

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

使用 npm 在 macOS 上安装 webpack

我想用 npm 安装 webpack:

sudo npm install -g webpack
Run Code Online (Sandbox Code Playgroud)

这是我的错误:

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Pre-built binaries not installable for fsevents@1.2.7 and node@11.10.1 (node-v67 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/usr/local/lib/node_modules/webpack/node_modules/fsevents/lib' 
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/webpack/node_modules/fsevents/build'
gyp ERR! System Darwin 18.2.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/usr/local/lib/node_modules/webpack/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64/fse.node" "--module_name=fse" "--module_path=/usr/local/lib/node_modules/webpack/node_modules/fsevents/lib/binding/Release/node-v67-darwin-x64" "--napi_version=4" "--node_abi_napi=napi"
gyp ERR! cwd …
Run Code Online (Sandbox Code Playgroud)

javascript node.js npm webpack

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

标签 统计

javascript ×2

babel ×1

babeljs ×1

css ×1

ecmascript-6 ×1

html ×1

node.js ×1

npm ×1

webpack ×1