Skip to content

Commit

Permalink
feat: 删除层级内联样式设置
Browse files Browse the repository at this point in the history
  • Loading branch information
lyxuncle committed Jul 18, 2019
1 parent 41bc02b commit b2dff58
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<meta name="format-detection" content="telephone=no">
<title>demo</title>

<link href="//storage.jd.com/ambient/styles-particles_emission.css?85198f380aff1325b5c4" rel="stylesheet"></head>
<link href="//storage.jd.com/ambient/styles-particles_emission.css?6189792f2d187c459a00" rel="stylesheet"></head>
<body>
<!-- S 主体内容 -->
<div class="o2team_ambient_main">
<canvas></canvas>
</div>
<!-- E 主体内容 -->

<script type="text/javascript" src="//storage.jd.com/ambient/control-particles_emission.js?85198f380aff1325b5c4"></script><script type="text/javascript" src="//storage.jd.com/ambient/bundle-particles_emission.js?85198f380aff1325b5c4"></script><script type="text/javascript" src="//storage.jd.com/ambient/config-particles_emission.js?85198f380aff1325b5c4"></script></body>
<script type="text/javascript" src="//storage.jd.com/ambient/control-particles_emission.js?6189792f2d187c459a00"></script><script type="text/javascript" src="//storage.jd.com/ambient/bundle-particles_emission.js?6189792f2d187c459a00"></script><script type="text/javascript" src="//storage.jd.com/ambient/config-particles_emission.js?6189792f2d187c459a00"></script></body>
</html>
4 changes: 2 additions & 2 deletions dist/index_demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<script type="text/javascript" src="//storage.jd.com/ambient-global/ambient-autoStop-head.js"></script>

<link href="//storage.jd.com/ambient/styles-particles_emission.css?85198f380aff1325b5c4" rel="stylesheet"></head>
<link href="//storage.jd.com/ambient/styles-particles_emission.css?6189792f2d187c459a00" rel="stylesheet"></head>
<body>
<!-- S 主体内容 -->
<div class="o2team_ambient_main">
Expand All @@ -18,5 +18,5 @@

<script type="text/javascript" src="//storage.jd.com/ambient-global/ambient-autoStop-body.js"></script>

<script type="text/javascript" src="//storage.jd.com/ambient/control-particles_emission.js?85198f380aff1325b5c4"></script><script type="text/javascript" src="//storage.jd.com/ambient/bundle-particles_emission.js?85198f380aff1325b5c4"></script><script type="text/javascript" src="//storage.jd.com/ambient/config-particles_emission.js?85198f380aff1325b5c4"></script></body>
<script type="text/javascript" src="//storage.jd.com/ambient/control-particles_emission.js?6189792f2d187c459a00"></script><script type="text/javascript" src="//storage.jd.com/ambient/bundle-particles_emission.js?6189792f2d187c459a00"></script><script type="text/javascript" src="//storage.jd.com/ambient/config-particles_emission.js?6189792f2d187c459a00"></script></body>
</html>
6 changes: 3 additions & 3 deletions info.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"title": "particles_emission",
"ambName": "粒子呼吸",
"github": "https://github.com/o2team-ambient/particles_emission",
"demoSnippet": "<link href=\"//storage.jd.com/ambient/styles-particles_emission.css?t=1553691016000\" rel=\"stylesheet\"></link><!-- S 主体内容 -->\n <div class=\"o2team_ambient_main\">\n <canvas></canvas>\n </div>\n <!-- E 主体内容 --><script src=\"//storage.jd.com/ambient/bundle-particles_emission.js?t=1553691016000\"></script>",
"controlUrl": "//storage.jd.com/ambient/control-particles_emission.js?t=1553691016000",
"configUrl": "//storage.jd.com/ambient/config-particles_emission.js?t=1553691016000",
"demoSnippet": "<link href=\"//storage.jd.com/ambient/styles-particles_emission.css?t=1563431559000\" rel=\"stylesheet\"></link><!-- S 主体内容 -->\n <div class=\"o2team_ambient_main\">\n <canvas></canvas>\n </div>\n <!-- E 主体内容 --><script src=\"//storage.jd.com/ambient/bundle-particles_emission.js?t=1563431559000\"></script>",
"controlUrl": "//storage.jd.com/ambient/control-particles_emission.js?t=1563431559000",
"configUrl": "//storage.jd.com/ambient/config-particles_emission.js?t=1563431559000",
"placeholderImg": "//storage.jd.com/ambient/particles_emission_placeholder.png?t=1554259855000",
"spriteImg": "//storage.jd.com/ambient/particles_emission_sprite.png?t=1554259855000"
}
2 changes: 1 addition & 1 deletion src/js/particles_emission.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ParticlesEmmision {
setup(p) {
const { width, height, options } = this
this.myCanvas = p.createCanvas(width, height)
this.myCanvas.canvas.style = `pointer-events: none; position:fixed; top:0; left:50%; transform: translateX(-50%); width: ${width}px; height: ${height}px; z-index: -1`
this.myCanvas.canvas.style = `pointer-events: none; position: fixed; top:0; left:50%; transform: translateX(-50%); width: ${width}px; height: ${height}px;`
}

draw(p) {
Expand Down

0 comments on commit b2dff58

Please sign in to comment.