使用方法/test3:修订间差异

来自康健生活
Kangkk​(留言 | 贡献)
无编辑摘要
Kangkk​(留言 | 贡献)
无编辑摘要
第2行: 第2行:
{{codepen
{{codepen
|tabs=<tabs>
|tabs=<tabs>
<tab name="html"><syntaxhighlight lang="html5">
<tab name="html"></tab>
<div class="tabs tabs-tabbox">
<input type="radio" form="tabs-inputform" id="tabs-input-1-0" name="tabs-1" class="tabs-input tabs-input-0" checked="">
<input type="radio" form="tabs-inputform" id="tabs-input-1-1" name="tabs-1" class="tabs-input tabs-input-1">
<label class="tabs-label" for="tabs-input-1-1" data-tabpos="1">Foo</label>
<wbr>
<input type="radio" form="tabs-inputform" id="tabs-input-1-2" name="tabs-1" class="tabs-input tabs-input-2">
<label class="tabs-label" for="tabs-input-1-2" data-tabpos="2">Bar</label>
<wbr>
<input type="radio" form="tabs-inputform" id="tabs-input-1-3" name="tabs-1" class="tabs-input tabs-input-3">
<label class="tabs-label" for="tabs-input-1-3" data-tabpos="3">Baz</label>
<wbr>
<div class="tabs-container" style="">
  <div class="tabs-content tabs-content-1">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
  <div class="tabs-content tabs-content-2">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
  <div class="tabs-content tabs-content-3">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
</div>
</div>
<div class="tabs tabs-tabbox">
<input type="radio" form="tabs-inputform" id="tabs-input-1-0" name="tabs-1" class="tabs-input tabs-input-0" checked="">
<input type="radio" form="tabs-inputform" id="tabs-input-1-1" name="tabs-1" class="tabs-input tabs-input-1">
<label class="tabs-label" for="tabs-input-1-1" data-tabpos="1">Foo</label>
<wbr>
<input type="radio" form="tabs-inputform" id="tabs-input-1-2" name="tabs-1" class="tabs-input tabs-input-2">
<label class="tabs-label" for="tabs-input-1-2" data-tabpos="2">Bar</label>
<wbr>
<input type="radio" form="tabs-inputform" id="tabs-input-1-3" name="tabs-1" class="tabs-input tabs-input-3">
<label class="tabs-label" for="tabs-input-1-3" data-tabpos="3">Baz</label>
<wbr>
<div class="tabs-container" style="">
  <div class="tabs-content tabs-content-1">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
  <div class="tabs-content tabs-content-2">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
  <div class="tabs-content tabs-content-3">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div>
</div>
</div></syntaxhighlight></tab>
<tab name="css"><syntaxhighlight lang="css">
<tab name="css"><syntaxhighlight lang="css">
* {
body {
   margin:0;
   background: black;
   padding:0;
  overflow: hidden;
}
   margin: 0;
ul li {
}</syntaxhighlight></tab>
  list-style:none;
<tab name="js"><syntaxhighlight lang="javascript">
}
let diameter;
.wrap {
let lines = [];
  width:530px;
const _noise = noise;
  height:530px;
_noise.seed(Math.random() * 100);
  background:#ddd;
let detail = 2;
   margin:100px auto;
function setup () {
   padding-top:20px;
   createCanvas(windowWidth, windowHeight);
   windowResized();
}
}
.wrap .list {
function mouseClicked () {
   position:relative;
   windowResized();
  margin:50px 0 0 100px;
}
}
.wrap .list li {
function windowResized () {
   float:left;
  resizeCanvas(windowWidth, windowHeight);
  diameter = min(width, height) * 0.8;
  noFill();
  stroke(255);
  strokeWeight(2);
  lines = [];
  for (let i = 0; i < 50; i++) {
    lines.push(new Line(i));
   }
}
}
.wrap .list li input {
function draw () {
   position:relative;
   clear();
   z-index:-1;
   circle(width / 2, height / 2, diameter);
  lines.forEach(l => l.draw());
}
}
.wrap .list li label {
class Line {
   display:block;
   constructor (i) {
  width:80px;
    this.angle = random(TWO_PI);
  height:50px;
    this.endX = sin(this.angle) * (diameter / 2) + width / 2;
  background:#6A9E52;
    this.endY = cos(this.angle) * (diameter / 2) + height / 2;
  text-align:center;
    this.stepX = (width / 2 - this.endX) / detail;
   line-height:50px;
    this.stepY = (height / 2 - this.endY) / detail;
  font-size:18px;
   }
  color:#fff;
  draw () {
  cursor:pointer;
   
  border-radius:3px 3px 0 0;
    beginShape();
  border:10x solid #6A9E52;
    for (let r = 0; r <= (diameter / 2); r+=detail) {
  transition:.3s;
      let x = sin(this.angle + r * 0.03);
}
      let y = cos(this.angle + r * 0.03);
.wrap .list li input:checked ~ div {
      let offset = _noise.simplex3(x * 0.2, y * 0.2, frameCount * 0.005) * 0.3;
   display:block;
      x = sin(this.angle + offset) * r;
      y = cos(this.angle + offset) * r;
      x += width / 2;
      y += height / 2;
      vertex(x, y);
    }
    endShape();
   }
}</syntaxhighlight></tab>
}</syntaxhighlight></tab>
<tab name="js"><syntaxhighlight lang="javascript">
var a=1;</syntaxhighlight></tab>
</tabs>
</tabs>
|iframe=<html><iframe src="https://kangkk.com/" name="kangkk.com"></html>
|iframe=<html><iframe src="https://kangkk.com/iframe/hypnose/dist/index.html" name="kangkk.com"></html>
}}
}}

2020年2月27日 (四) 09:20的版本