|
|
|
@ -211,27 +211,90 @@ codeRef.setCode('new code');//设置代码
|
|
|
|
</div>` }}</w-code>
|
|
|
|
</div>` }}</w-code>
|
|
|
|
|
|
|
|
|
|
|
|
<h2>呼吸灯效果</h2>
|
|
|
|
<h2>呼吸灯效果</h2>
|
|
|
|
<w-effect-light>
|
|
|
|
<div
|
|
|
|
<div style="height: 5em; width: 5em; background-color: var(--w-main);"></div>
|
|
|
|
style="display: grid; grid-template-columns: repeat(10, 5em); grid-template-rows: 5em; gap: 1em; margin-bottom: 1em;">
|
|
|
|
</w-effect-light>
|
|
|
|
<w-effect-light>
|
|
|
|
<w-effect-light :am="am" style="--key: brightness(150%); --time:1s;">
|
|
|
|
<div style="height: 100%; width: 100%; background-color: var(--w-main);"></div>
|
|
|
|
<div style="height: 5em; width: 5em; background-color: var(--w-main);"></div>
|
|
|
|
</w-effect-light>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<w-effect-light style="--time:3s; --filter: brightness(150%);">
|
|
|
|
|
|
|
|
<div style="height: 100%; width: 100%; background-color: var(--w-main);"></div>
|
|
|
|
|
|
|
|
</w-effect-light>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<w-effect-light style="--time:5s; --filter: hue-rotate(360deg); background-color: var(--w-main);">
|
|
|
|
|
|
|
|
</w-effect-light>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<w-effect-breathing>
|
|
|
|
|
|
|
|
<div style="height: 100%; width: 100%; background-color: var(--w-main);"></div>
|
|
|
|
|
|
|
|
</w-effect-breathing>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="w-breathing" style="background-color: var(--w-main);"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="w-breathing"
|
|
|
|
|
|
|
|
style="background-color: var(--w-main); --time:2s; --filter: brightness(70%) opacity(0); --transform: skew(-5deg) scale(1.2);">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="w-breathing w-flex"
|
|
|
|
|
|
|
|
style="background-color: var(--w-main); --time:3s;--filter:none;--transform:none; --data-num: .3; --data-num-to: 1; box-shadow: 0 0 calc(2em * var(--data-num)) #000;">
|
|
|
|
|
|
|
|
<div style="height: 3em; width: calc(3em * var(--data-num)); background-color: #FFF3; border-radius: 100%;">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<w-effect-light :style="{ 'animation-play-state': am ? 'running' : 'paused' }"
|
|
|
|
|
|
|
|
style="--filter: brightness(150%); --time:2s; ">
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
|
|
|
style="height: 5em; width: 5em; background-color: var(--w-main); border-radius: 1em; margin-bottom: .5em;">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</w-effect-light>
|
|
|
|
</w-effect-light>
|
|
|
|
<el-button @click="am = !am;">{{ am ? '暂停' : '播放' }}</el-button>
|
|
|
|
<el-button @click="am = !am;">{{ am ? '暂停' : '播放' }}</el-button>
|
|
|
|
|
|
|
|
|
|
|
|
<w-code language="html">
|
|
|
|
<w-code language="html">
|
|
|
|
{{ ` <w-effect-light>
|
|
|
|
{{ `
|
|
|
|
<div style="height: 5em; width: 5em; background-color: var(--w-main);"></div>
|
|
|
|
<div
|
|
|
|
|
|
|
|
style="display: grid; grid-template-columns: repeat(10, 5em); grid-template-rows: 5em; gap: 1em; margin-bottom: 1em;">
|
|
|
|
|
|
|
|
<w-effect-light>
|
|
|
|
|
|
|
|
<div style="height: 100%; width: 100%; background-color: var(--w-main);"></div>
|
|
|
|
</w-effect-light>
|
|
|
|
</w-effect-light>
|
|
|
|
<w-effect-light :am="am" style="--key: brightness(150%); --time:1s;">
|
|
|
|
|
|
|
|
<div style="height: 5em; width: 5em; background-color: var(--w-main);"></div>
|
|
|
|
<w-effect-light style="--time:3s; --filter: brightness(150%);">
|
|
|
|
|
|
|
|
<div style="height: 100%; width: 100%; background-color: var(--w-main);"></div>
|
|
|
|
</w-effect-light>
|
|
|
|
</w-effect-light>
|
|
|
|
<el-button @click="am=!am;">\{\{ am?'暂停':'播放' \}\}</el-button>` }}
|
|
|
|
|
|
|
|
|
|
|
|
<w-effect-light style="--time:5s; --filter: hue-rotate(360deg); background-color: var(--w-main);">
|
|
|
|
|
|
|
|
</w-effect-light>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<w-effect-breathing>
|
|
|
|
|
|
|
|
<div style="height: 100%; width: 100%; background-color: var(--w-main);"></div>
|
|
|
|
|
|
|
|
</w-effect-breathing>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="w-breathing" style="background-color: var(--w-main);"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="w-breathing"
|
|
|
|
|
|
|
|
style="background-color: var(--w-main); --time:2s; --filter: brightness(70%) opacity(0); --transform: skew(-5deg) scale(1.2);">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="w-breathing w-flex"
|
|
|
|
|
|
|
|
style="background-color: var(--w-main); --time:3s;--filter:none;--transform:none; --data-num: .3; --data-num-to: 1; box-shadow: 0 0 calc(2em * var(--data-num)) #000;">
|
|
|
|
|
|
|
|
<div style="height: 3em; width: calc(3em * var(--data-num)); background-color: #FFF3; border-radius: 100%;">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<w-effect-light :style="{ 'animation-play-state': am ? 'running' : 'paused' }"
|
|
|
|
|
|
|
|
style="--filter: brightness(150%); --time:2s; ">
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
|
|
|
style="height: 5em; width: 5em; background-color: var(--w-main); border-radius: 1em; margin-bottom: .5em;">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</w-effect-light>
|
|
|
|
|
|
|
|
<el-button @click="am = !am;">\{\{ am ? '暂停' : '播放' \}\}</el-button>` }}
|
|
|
|
</w-code>
|
|
|
|
</w-code>
|
|
|
|
|
|
|
|
|
|
|
|
<h2>干扰动画效果</h2>
|
|
|
|
<h2>干扰动画效果</h2>
|
|
|
|
<w-effect-noise :am="am1" style="--time:5s;">
|
|
|
|
<w-effect-noise :am="am1" style="--time:5s;">
|
|
|
|
<div style="height: 5em; width: 5em; background-color: var(--w-main); border-radius: 10em;"></div>
|
|
|
|
<div style="height: 5em; width: 5em; background-color: var(--w-main); border-radius: 10em;"></div>
|
|
|
|
</w-effect-noise>
|
|
|
|
</w-effect-noise>
|
|
|
|
|
|
|
|
|
|
|
|
<el-button @click="am1 = !am1;">{{ am1 ? '暂停' : '播放' }}</el-button>
|
|
|
|
<el-button @click="am1 = !am1;">{{ am1 ? '暂停' : '播放' }}</el-button>
|
|
|
|
|
|
|
|
|
|
|
|
<h2>加载动画效果</h2>
|
|
|
|
<h2>加载动画效果</h2>
|
|
|
|
@ -351,7 +414,7 @@ codeRef.setCode('new code');//设置代码
|
|
|
|
<div>10rem = <b v-text="unit.rem2px(10)"></b>px</div>
|
|
|
|
<div>10rem = <b v-text="unit.rem2px(10)"></b>px</div>
|
|
|
|
<div>10em = <b v-if="emRef1" v-text="unit.em2px(emRef1,'10em')"></b>px</div>
|
|
|
|
<div>10em = <b v-if="emRef1" v-text="unit.em2px(emRef1,'10em')"></b>px</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { ref,useTemplateRef } from 'vue';
|
|
|
|
import { ref,useTemplateRef } from 'vue';
|
|
|
|
const emRef1 = ref(undefined);
|
|
|
|
const emRef1 = ref(undefined);
|
|
|
|
const emRef2 = useTemplateRef("emRef2");
|
|
|
|
const emRef2 = useTemplateRef("emRef2");
|
|
|
|
|