星辰大海路上的种花家 - 兴趣爱好 /index.php/category/xqhh/ 360度旋转相册 /index.php/posts/180.html 2024-04-19T02:18:00+00:00 /usr/uploads/2024/04/3728640568.png<!DOCTYPE html> <meta charset="UTF-8" /> <meta name="Keywords" content="" /> <meta name="Description" content="" /> <title>图册</title> <!-- 如果我有天醒来 --> <!-- 层叠样式表 --> <style type="text/css"> /* 去掉默认效果 */ * { margin: 0; padding: 0; } body { background: #222; overflow: hidden; /* 取消选中 */ user-select: none; } @keyframes rotate { 100% { transform: rotateY(360deg); } } .perspective { /*子元素透视 场景深度*/ perspective: 600px; } .wrap { /* 3d */ width: 135px; height: 240px; margin: 100px auto; position: relative; /* border: 1px solid red; */ transform: rotateX(-20deg) rotateY(0deg); transform-style: preserve-3d; } .wrap img { display: block; /* 绝对定位 */ position: absolute; width: 100%; height: 100%; transform: rotateY(0deg) translateZ(0px); background: transparent; box-shadow: 0 0 4px #fff; border-radius: 5px; /* webkit */ } /* 照片底座 */ .wrap p { width: 1200px; height: 1200px; background: -webkit-radial-gradient(center center, 600px 600px, rgba(122, 122, 122, 0.5), rgba(0, 0, 0, 0)); position: absolute; border-radius: 50%; left: 50%; top: 100%; margin-left: -600px; margin-top: -600px; /* 沿着x轴按倒 */ transform: rotateX(90deg); } </style><!-- 盒子容器 --> <div class="perspective"> <div class="wrap" id="imgwrap"> <!-- 引入图片值页面 --> //图片自选 <img class="f1" src="01.jpg" /> <img class="f1" src="02.jpg" /> <img class="f1" src="03.jpg" /> <img class="f1" src="1.webp" /> <img class="f1" src="2.webp" /> <img class="f1" src="3.webp" /> <img class="f1" src="4.webp" /> <img class="f1" src="5.webp" /> <img class="f1" src="6.webp" /> <img class="f1" src="7.webp" /> <img class="f1" src="8.webp" /> <img class="f1" src="9.webp" /> <img class="f1" src="10.webp" /> <img class="f1" src="11.webp" /> <img class="f1" src="12.webp" /> <img class="f1" src="13.webp" /> <img class="f1" src="14.webp" /> <img class="f1" src="15.webp" /> <img class="f1" src="16.webp" /> <img class="f1" src="17.webp" /> <img class="f1" src="18.webp" /> <img class="f1" src="19.webp" /> <img class="f1" src="20.webp" /> <img class="f1" src="21.webp" /> <img class="f1" src="22.webp" /> <img class="f1" src="23.webp" /> <img class="f1" src="24.webp" /> <img class="f1" src="25.webp" /> <img class="f1" src="26.webp" /> <img class="f1" src="27.png" /> <img class="f1" src="27.webp" /> <img class="f1" src="01.jpg" /> <img class="f1" src="02.jpg" /> <!-- 引入图片值页面 --> <img class="f2" src="01.jpg" /> <img class="f2" src="02.jpg" /> <img class="f2" src="03.jpg" /> <img class="f2" src="4.webp" /> <img class="f2" src="5.webp" /> <img class="f2" src="6.webp" /> <img class="f2" src="7.webp" /> <img class="f2" src="8.webp" /> <img class="f2" src="9.webp" /> <img class="f2" src="10.webp" /> <img class="f2" src="11.webp" /> <img class="f2" src="12.webp" /> <img class="f2" src="13.webp" /> <img class="f2" src="14.webp" /> <img class="f2" src="15.webp" /> <img class="f2" src="16.webp" /> <img class="f2" src="17.webp" /> <img class="f2" src="18.webp" /> <img class="f2" src="19.webp" /> <img class="f2" src="20.webp" /> <img class="f2" src="21.webp" /> <img class="f2" src="22.webp" /> <img class="f2" src="23.webp" /> <img class="f2" src="24.webp" /> <img class="f2" src="25.webp" /> <img class="f2" src="26.webp" /> <img class="f2" src="27.png" /> <img class="f2" src="27.webp" /> <img class="f2" src="1.webp" /> <img class="f2" src="2.webp" /> <img class="f2" src="3.webp" /> <img class="f2" src="01.jpg" /> <img class="f2" src="02.jpg" /> <!-- 引入图片值页面 --> <img class="f3" src="01.jpg" /> <img class="f3" src="02.jpg" /> <img class="f3" src="03.jpg" /> <img class="f3" src="4.webp" /> <img class="f3" src="5.webp" /> <img class="f3" src="6.webp" /> <img class="f3" src="7.webp" /> <img class="f3" src="8.webp" /> <img class="f3" src="9.webp" /> <img class="f3" src="10.webp" /> <img class="f3" src="11.webp" /> <img class="f3" src="12.webp" /> <img class="f3" src="13.webp" /> <img class="f3" src="14.webp" /> <img class="f3" src="15.webp" /> <img class="f3" src="16.webp" /> <img class="f3" src="17.webp" /> <img class="f3" src="18.webp" /> <img class="f3" src="20.webp" /> <img class="f3" src="19.webp" /> <img class="f3" src="21.webp" /> <img class="f3" src="22.webp" /> <img class="f3" src="23.webp" /> <img class="f3" src="24.webp" /> <img class="f3" src="25.webp" /> <img class="f3" src="26.webp" /> <img class="f3" src="27.png" /> <img class="f3" src="01.jpg" /> <img class="f3" src="02.jpg" /> <img class="f3" src="010.webp" /> <img class="f3" src="5.webp" /> <img class="f3" src="6.webp" /> <img class="f3" src="7.webp" /> <p></p> </div> </div> <!-- src="JS/photo.js" --> <script type="text/javascript"> var oImg = document.getElementsByClassName("f1"); var oImg2 = document.getElementsByClassName("f2"); var oImg3 = document.getElementsByClassName("f3"); var len = oImg.length; console.log(len); var deg = 360 / len; var oWrap = document.getElementById("imgwrap"); // var oWrap=document.querySelector('.wrap'); //页面加载完毕在执行的代码 window.onload = function () { Array.prototype.forEach.call(oImg, function (ele, index, self) { // 旋转并沿Z轴平移 ele.style.transform = "rotateY(" + deg * index + "deg) translateZ(645.75px)"; //过渡时间1s ele.style.transition = "1s " + (len - index) * 0.1 + "s"; }); Array.prototype.forEach.call(oImg2, function (ele, index, self) { // 旋转并沿Z轴平移 ele.style.transform = "rotateY(" + deg * index + "deg) translateZ(645.75px) translateY(240px)"; //过渡时间1s ele.style.transition = "1s " + (len - index) * 0.1 + "s"; }); Array.prototype.forEach.call(oImg3, function (ele, index, self) { // 旋转并沿Z轴平移 ele.style.transform = "rotateY(" + deg * index + "deg) translateZ(645.75px) translateY(480px)"; //过渡时间1s ele.style.transition = "1s " + (len - index) * 0.1 + "s"; }); // Array.prototype.forEach.call(oImg, function (ele, index, self) { // // 旋转并沿Z轴平移 // ele.style.transform = "rotateY(" + deg * index + "deg) translateZ(350px)"; // //过渡时间1s // ele.style.transition = "1s " + (len - index) * 0.1 + "s"; // }); }; //翻动3D相册 var newX, newY, lastX, lastY, minusX, minusY, rotX = -20, rotY = 0; document.onmousedown = function (e) { // 点击设置初值 lastX = e.clientX; lastY = e.clientY; this.onmousemove = function (e) { newX = e.clientX; newY = e.clientY; minusX = newX - lastX; minusY = newY - lastY; rotX -= minusY * 0.2; rotY += minusX * 0.1; oWrap.style.transform = "rotateX(" + rotX + "deg) rotateY(" + rotY + "deg)"; lastX = newX; lastY = newY; }; this.onmouseup = function (e) { //鼠标松开 this.onmousemove = null; //清除鼠标移动 }; }; </script> 圆球滚动变颜色 /index.php/posts/111.html 2023-12-16T07:34:00+00:00 <!DOCTYPE html><head> <meta charset="utf-8"> <title></title> <style> .种花家{ width: 100px; height: 100px; background: red; position: relative; border-radius: 50%; animation: dh 5s linear 2s running; } .种花家:hover{ animation-play-state: paused; } @keyframes dh{ 0%{background: red;left: 0;} 25%{background:pink; left: 25px;} 50%{background:blue; left: 50px;} 75%{background:orange; left: 75px;} 100%{background:green; left: 100px;}} @keyframes dhh{ 0%{background: red;left: 0;} 25%{background:pink;left: 25px;} 50%{background:blue;left: 50px;} 75%{background:orange;left: 75px;} 100%{background:green;left: 100px;} } .种花家1{ width: 100px; height: 100px; background: red; border-radius: 50%; position: relative; animation: dhh 5s linear; } </style> </head> <body>演示:1216.mov <div class="种花家"></div> <hr /> <div class="种花家1"></div> </body> 最炫酷粒子 /index.php/posts/109.html 2023-12-11T13:31:00+00:00 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> New Document @import "compass/css3";@import "compass/reset";@import "compass/css3";body{ overflow: hidden;}canvas{ width: 100%; height: 100%;} #ifdef GL_ES precision highp float; #endif void main(void) { gl_FragColor = vec4(0.2, 0.3, 0.4, 1.0); } attribute vec3 vertexPosition; uniform mat4 modelViewMatrix; uniform mat4 perspectiveMatrix; void main(void) { gl_Position = perspectiveMatrix * modelViewMatrix * vec4( vertexPosition, 1.0); } window.onload = loadScene; var canvas, gl, ratio, vertices, velocities, freqArr, cw, ch, colorLoc, thetaArr, velThetaArr, velRadArr, boldRateArr, drawType, numLines = 40000; var target = []; var randomTargetXArr = [], randomTargetYArr = []; drawType = 2; /** * Initialises WebGL and creates the 3D scene. */ function loadScene() { // Get the canvas element canvas = document.getElementById("c"); // Get the WebGL context gl = canvas.getContext("experimental-webgl"); // Check whether the WebGL context is available or not // if it's not available exit if (!gl) { alert("There's no WebGL context available."); return; } // Set the viewport to the canvas width and height cw = window.innerWidth; ch = window.innerHeight; canvas.width = cw; canvas.height = ch; gl.viewport(0, 0, canvas.width, canvas.height); // Load the vertex shader that's defined in a separate script // block at the top of this page. // More info about shaders: http://en.wikipedia.org/wiki/Shader_Model // More info about GLSL: http://en.wikipedia.org/wiki/GLSL // More info about vertex shaders: http://en.wikipedia.org/wiki/Vertex_shader // Grab the script element var vertexShaderScript = document.getElementById("shader-vs"); var vertexShader = gl.createShader(gl.VERTEX_SHADER); gl.shaderSource(vertexShader, vertexShaderScript.text); gl.compileShader(vertexShader); if (!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) { alert("Couldn't compile the vertex shader"); gl.deleteShader(vertexShader); return; } // Load the fragment shader that's defined in a separate script // More info about fragment shaders: http://en.wikipedia.org/wiki/Fragment_shader var fragmentShaderScript = document.getElementById("shader-fs"); var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER); gl.shaderSource(fragmentShader, fragmentShaderScript.text); gl.compileShader(fragmentShader); if (!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) { alert("Couldn't compile the fragment shader"); gl.deleteShader(fragmentShader); return; } // Create a shader program. gl.program = gl.createProgram(); gl.attachShader(gl.program, vertexShader); gl.attachShader(gl.program, fragmentShader); gl.linkProgram(gl.program); if (!gl.getProgramParameter(gl.program, gl.LINK_STATUS)) { alert("Unable to initialise shaders"); gl.deleteProgram(gl.program); gl.deleteProgram(vertexShader); gl.deleteProgram(fragmentShader); return; } // Install the program as part of the current rendering state gl.useProgram(gl.program); // Get the vertexPosition attribute from the linked shader program var vertexPosition = gl.getAttribLocation(gl.program, "vertexPosition"); // Enable the vertexPosition vertex attribute array. If enabled, the array // will be accessed an used for rendering when calls are made to commands like // gl.drawArrays, gl.drawElements, etc. gl.enableVertexAttribArray(vertexPosition); // Clear the color buffer (r, g, b, a) with the specified color gl.clearColor(0.0, 0.0, 0.0, 1.0); // Clear the depth buffer. The value specified is clamped to the range [0,1]. // More info about depth buffers: http://en.wikipedia.org/wiki/Depth_buffer gl.clearDepth(1.0); // Enable depth testing. This is a technique used for hidden surface removal. // It assigns a value (z) to each pixel that represents the distance from this // pixel to the viewer. When another pixel is drawn at the same location the z // values are compared in order to determine which pixel should be drawn. //gl.enable(gl.DEPTH_TEST); gl.enable(gl.BLEND); gl.disable(gl.DEPTH_TEST); gl.blendFunc(gl.SRC_ALPHA, gl.ONE); // Specify which function to use for depth buffer comparisons. It compares the // value of the incoming pixel against the one stored in the depth buffer. // Possible values are (from the OpenGL documentation): // GL_NEVER - Never passes. // GL_LESS - Passes if the incoming depth value is less than the stored depth value. // GL_EQUAL - Passes if the incoming depth value is equal to the stored depth value. // GL_LEQUAL - Passes if the incoming depth value is less than or equal to the stored depth value. // GL_GREATER - Passes if the incoming depth value is greater than the stored depth value. // GL_NOTEQUAL - Passes if the incoming depth value is not equal to the stored depth value. // GL_GEQUAL - Passes if the incoming depth value is greater than or equal to the stored depth value. // GL_ALWAYS - Always passes. //gl.depthFunc(gl.LEQUAL); // Now create a shape. // First create a vertex buffer in which we can store our data. var vertexBuffer = gl.createBuffer(); // Bind the buffer object to the ARRAY_BUFFER target. gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer); // Specify the vertex positions (x, y, z) // ------------------ setup(); // ------------------ vertices = new Float32Array(vertices); velocities = new Float32Array(velocities); thetaArr = new Float32Array(thetaArr); velThetaArr = new Float32Array(velThetaArr); velRadArr = new Float32Array(velRadArr); // Creates a new data store for the vertices array which is bound to the ARRAY_BUFFER. // The third paramater indicates the usage pattern of the data store. Possible values are // (from the OpenGL documentation): // The frequency of access may be one of these: // STREAM - The data store contents will be modified once and used at most a few times. // STATIC - The data store contents will be modified once and used many times. // DYNAMIC - The data store contents will be modified repeatedly and used many times. // The nature of access may be one of these: // DRAW - The data store contents are modified by the application, and used as the source for // GL drawing and image specification commands. // READ - The data store contents are modified by reading data from the GL, and used to return // that data when queried by the application. // COPY - The data store contents are modified by reading data from the GL, and used as the source // for GL drawing and image specification commands. gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.DYNAMIC_DRAW); // Clear the color buffer and the depth buffer gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); // Define the viewing frustum parameters // More info: http://en.wikipedia.org/wiki/Viewing_frustum // More info: https://knol.google.com/k/view-frustum var fieldOfView = 30.0; var aspectRatio = canvas.width / canvas.height; var nearPlane = 1.0; var farPlane = 10000.0; var top = nearPlane * Math.tan(fieldOfView * Math.PI / 360.0); var bottom = -top; var right = top * aspectRatio; var left = -right; // Create the perspective matrix. The OpenGL function that's normally used for this, // glFrustum() is not included in the WebGL API. That's why we have to do it manually here. // More info: http://www.cs.utk.edu/~vose/c-stuff/opengl/glFrustum.html var a = (right + left) / (right - left); var b = (top + bottom) / (top - bottom); var c = (farPlane + nearPlane) / (farPlane - nearPlane); var d = (2 * farPlane * nearPlane) / (farPlane - nearPlane); var x = (2 * nearPlane) / (right - left); var y = (2 * nearPlane) / (top - bottom); var perspectiveMatrix = [ x, 0, a, 0, 0, y, b, 0, 0, 0, c, d, 0, 0, -1, 0 ]; // Create the modelview matrix // More info about the modelview matrix: http://3dengine.org/Modelview_matrix // More info about the identity matrix: http://en.wikipedia.org/wiki/Identity_matrix var modelViewMatrix = [ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ]; // Get the vertex position attribute location from the shader program var vertexPosAttribLocation = gl.getAttribLocation(gl.program, "vertexPosition"); // colorLoc = gl.getVaryingLocation(gl.program, "vColor"); // alert("color loc : " + colorLoc ); // Specify the location and format of the vertex position attribute gl.vertexAttribPointer(vertexPosAttribLocation, 3.0, gl.FLOAT, false, 0, 0); //gl.vertexAttribPointer(colorLoc, 4.0, gl.FLOAT, false, 0, 0); // Get the location of the "modelViewMatrix" uniform variable from the // shader program var uModelViewMatrix = gl.getUniformLocation(gl.program, "modelViewMatrix"); // Get the location of the "perspectiveMatrix" uniform variable from the // shader program var uPerspectiveMatrix = gl.getUniformLocation(gl.program, "perspectiveMatrix"); // Set the values gl.uniformMatrix4fv(uModelViewMatrix, false, new Float32Array(perspectiveMatrix)); gl.uniformMatrix4fv(uPerspectiveMatrix, false, new Float32Array(modelViewMatrix)); // gl.varyingVector4fv( // Draw the triangles in the vertex buffer. The first parameter specifies what // drawing mode to use. This can be GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, // GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_QUAD_STRIP, // GL_QUADS, and GL_POLYGON //gl.drawArrays( gl.LINES, 0, numLines ); //gl.flush(); //setInterval( drawScene, 1000 / 40 ); animate(); setTimeout(timer, 1500); } var count = 0; var cn = 0; function animate() { requestAnimationFrame(animate); drawScene(); } function drawScene() { draw(); gl.lineWidth(1); gl.bufferData(gl.ARRAY_BUFFER, vertices, gl.DYNAMIC_DRAW); gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT); //gl.drawArrays( gl.LINES_STRIP, 0, numLines ); gl.drawArrays(gl.LINES, 0, numLines); //gl.drawArrays( gl.QUAD_STRIP, 0, numLines ); gl.flush(); } // =================================== function setup() { setup2(); } function draw() { switch (drawType) { case 0: draw0(); break; case 1: draw1(); break; case 2: draw2(); break; } } // =================================== function setup1() { vertices = []; velThetaArr = []; velRadArr = []; ratio = cw / ch; velocities = []; // ------------------------------- for (var i = 0; i < numLines; i++) { var rad = Math.random() * 2 + .5; var theta = Math.random() * Math.PI * 2; var velTheta = Math.random() * Math.PI * 2; vertices.push(rad * Math.cos(theta), rad * Math.sin(theta), 1.83);//(Math.random() * 2 - 1)*ratio, Math.random() * 2 - 1, 1.83 ); vertices.push(rad * Math.cos(theta), rad * Math.sin(theta), 1.83); velocities.push((Math.random() * 2 - 1) * .05, (Math.random() * 2 - 1) * .05, .93 + Math.random() * .02); velThetaArr.push(velTheta); velRadArr.push(rad); } } // ------------------------------- function setup2() { vertices = []; velThetaArr = []; velRadArr = []; ratio = cw / ch; velocities = []; thetaArr = []; freqArr = []; boldRateArr = []; // ------------------------------- for (var ii = 0; ii < numLines; ii++) { var rad = ( 0.1 + .2 * Math.random() ); var theta = Math.random() * Math.PI * 2; var velTheta = Math.random() * Math.PI * 2 / 30; var freq = Math.random() * 0.12 + 0.03; var boldRate = Math.random() * .04 + .01; var randomPosX = (Math.random() * 2 - 1) * window.innerWidth / window.innerHeight; var randomPosY = Math.random() * 2 - 1; vertices.push(rad * Math.cos(theta), rad * Math.sin(theta), 1.83); vertices.push(rad * Math.cos(theta), rad * Math.sin(theta), 1.83); thetaArr.push(theta); velThetaArr.push(velTheta); velRadArr.push(rad); freqArr.push(freq); boldRateArr.push(boldRate); randomTargetXArr.push(randomPosX); randomTargetYArr.push(randomPosY); } freqArr = new Float32Array(freqArr); } // ------------------------------- // =================================== function draw0() { var i, n = vertices.length, p, bp; var px, py; var pTheta; var rad; var num; var targetX, targetY; for (i = 0; i < numLines * 2; i += 2) { count += .3; bp = i * 3; vertices[bp] = vertices[bp + 3]; vertices[bp + 1] = vertices[bp + 4]; num = parseInt(i / 2); targetX = randomTargetXArr[num]; targetY = randomTargetYArr[num]; px = vertices[bp + 3]; px += (targetX - px) * (Math.random() * .04 + .06); vertices[bp + 3] = px; //py = (Math.sin(cn) + 1) * .2 * (Math.random() * .5 - .25); py = vertices[bp + 4]; py += (targetY - py) * (Math.random() * .04 + .06); vertices[bp + 4] = py; } } // ------------------------------- function draw1() { var i, n = vertices.length, p, bp; var px, py; var pTheta; var rad; var num; var targetX, targetY; for (i = 0; i < numLines * 2; i += 2) { count += .3; bp = i * 3; vertices[bp] = vertices[bp + 3]; vertices[bp + 1] = vertices[bp + 4]; num = parseInt(i / 2); pTheta = thetaArr[num]; rad = velRadArr[num]; pTheta = pTheta + velThetaArr[num]; thetaArr[num] = pTheta; targetX = rad * Math.cos(pTheta); targetY = rad * Math.sin(pTheta); px = vertices[bp + 3]; px += (targetX - px) * (Math.random() * .1 + .1); vertices[bp + 3] = px; //py = (Math.sin(cn) + 1) * .2 * (Math.random() * .5 - .25); py = vertices[bp + 4]; py += (targetY - py) * (Math.random() * .1 + .1); vertices[bp + 4] = py; } } // ------------------------------- function draw2() { cn += .1; var i, n = vertices.length, p, bp; var px, py; var pTheta; var rad; var num; for (i = 0; i < numLines * 2; i += 2) { count += .3; bp = i * 3; // copy old positions vertices[bp] = vertices[bp + 3]; vertices[bp + 1] = vertices[bp + 4]; num = parseInt(i / 2); pTheta = thetaArr[num]; rad = velRadArr[num];// + Math.cos(pTheta + i * freqArr[i]) * boldRateArr[num]; pTheta = pTheta + velThetaArr[num]; thetaArr[num] = pTheta; px = vertices[bp + 3]; px = rad * Math.cos(pTheta) * 0.1 + px; vertices[bp + 3] = px; //py = (Math.sin(cn) + 1) * .2 * (Math.random() * .5 - .25); py = vertices[bp + 4]; py = py + rad * Math.sin(pTheta) * 0.1; //p *= ( Math.random() -.5); vertices[bp + 4] = py; } } // ------------------------------- function timer() { drawType = (drawType + 1) % 3; setTimeout(timer, 1500); } 半圆 /index.php/posts/62.html 2023-11-30T09:31:00+00:00 <!DOCTYPE html><meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .box { width: 200px; height: 400px; border: 1px solid red; margin: 100px auto; position: relative; } .brand { width: 200px; height: 400px; position: absolute; left: 0; top: 0; border: 1px solid black; background: url(170.png); transform-origin: 100px 400px; transition-property: all; transition-duration: 1.5s; /* 回弹效果 */ transition-timing-function: linear; } .box:hover .brand:nth-child(1) { transform: rotate(-90deg); } .box:hover .brand:nth-child(2) { transform: rotate(-80deg); } .box:hover .brand:nth-child(3) { transform: rotate(-70deg); } .box:hover .brand:nth-child(4) { transform: rotate(-60deg); } .box:hover .brand:nth-child(5) { transform: rotate(-50deg); } .box:hover .brand:nth-child(6) { transform: rotate(-40deg); } .box:hover .brand:nth-child(7) { transform: rotate(-30deg); } .box:hover .brand:nth-child(8) { transform: rotate(-20deg); } .box:hover .brand:nth-child(9) { transform: rotate(-10deg); } .box:hover .brand:nth-child(10) { transform: rotate(00deg); } .box:hover .brand:nth-child(11) { transform: rotate(10deg); } .box:hover .brand:nth-child(12) { transform: rotate(20deg); } .box:hover .brand:nth-child(13) { transform: rotate(30deg); } .box:hover .brand:nth-child(14) { transform: rotate(40deg); } .box:hover .brand:nth-child(15) { transform: rotate(50deg); } .box:hover .brand:nth-child(16) { transform: rotate(60deg); } .box:hover .brand:nth-child(17) { transform: rotate(70deg); } .box:hover .brand:nth-child(18) { transform: rotate(80deg); } .box:hover .brand:nth-child(19) { transform: rotate(90deg); } </style> <div class="box"> <div class="brand">1</div> <div class="brand">2</div> <div class="brand">3</div> <div class="brand">4</div> <div class="brand">5</div> <div class="brand">6</div> <div class="brand">7</div> <div class="brand">8</div> <div class="brand">9</div> <div class="brand">10</div> <div class="brand">11</div> <div class="brand">12</div> <div class="brand">13</div> <div class="brand">14</div> <div class="brand">15</div> <div class="brand">16</div> <div class="brand">17</div> <div class="brand">18</div> <div class="brand">19</div> </div> 展开扑克牌 /index.php/posts/59.html 2023-11-30T05:29:00+00:00 <!DOCTYPE html><meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .box { width: 200px; height: 400px; border: 1px solid black; margin: 100px auto; position: relative; } .brand { width: 100%; height: 400px; position: absolute; left: 0; top: 0; border: 1px solid black; background: url(./images/goast.jpg); transform-origin: 100px 400px; transition-property: all; transition-duration: 1.5s; /* 回弹效果 */ transition-timing-function: linear; } .box:hover .brand:nth-child(1) { transform: rotate(-60deg); } .box:hover .brand:nth-child(2) { transform: rotate(-50deg); } .box:hover .brand:nth-child(3) { transform: rotate(-40deg); } .box:hover .brand:nth-child(4) { transform: rotate(-30deg); } .box:hover .brand:nth-child(5) { transform: rotate(-20deg); } .box:hover .brand:nth-child(6) { transform: rotate(-10deg); } .box:hover .brand:nth-child(7) { transform: rotate(0deg); } .box:hover .brand:nth-child(8) { transform: rotate(10deg); } .box:hover .brand:nth-child(9) { transform: rotate(20deg); } .box:hover .brand:nth-child(10) { transform: rotate(30deg); } .box:hover .brand:nth-child(11) { transform: rotate(40deg); } .box:hover .brand:nth-child(12) { transform: rotate(50deg); } .box:hover .brand:nth-child(13) { transform: rotate(60deg); } </style>演示:QQ录屏20231130132641.mov <div class="box"> <div class="brand">A</div> <div class="brand">2</div> <div class="brand">3</div> <div class="brand">4</div> <div class="brand">5</div> <div class="brand">6</div> <div class="brand">7</div> <div class="brand">8</div> <div class="brand">9</div> <div class="brand">10</div> <div class="brand">J</div> <div class="brand">Q</div> <div class="brand">K</div> </div> 展开花海 /index.php/posts/47.html 2023-11-29T14:42:00+00:00 <!DOCTYPE html><meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .box { width: 200px; height: 400px; border: 1px solid black; margin: 100px auto; position: relative; } .brand { width: 100%; height: 400px; position: absolute; left: 0; top: 0; border: 1px solid black; background: url(123.jpg); transform-origin: 100px 400px; transition-property: all; transition-duration: 1.5s; /* 回弹效果 */ transition-timing-function: linear; } .box:hover .brand:nth-child(1) { transform: rotate(-190deg); } .box:hover .brand:nth-child(2) { transform: rotate(-180deg); } .box:hover .brand:nth-child(3) { transform: rotate(-170deg); } .box:hover .brand:nth-child(4) { transform: rotate(-160deg); } .box:hover .brand:nth-child(5) { transform: rotate(-150deg); } .box:hover .brand:nth-child(6) { transform: rotate(-140deg); } .box:hover .brand:nth-child(7) { transform: rotate(-130deg); } .box:hover .brand:nth-child(8) { transform: rotate(-120deg); } .box:hover .brand:nth-child(9) { transform: rotate(-110deg); } .box:hover .brand:nth-child(10) { transform: rotate(-100deg); } .box:hover .brand:nth-child(11) { transform: rotate(-90deg); } .box:hover .brand:nth-child(12) { transform: rotate(-80deg); } .box:hover .brand:nth-child(13) { transform: rotate(-70deg); } .box:hover .brand:nth-child(14) { transform: rotate(-60deg); } .box:hover .brand:nth-child(15) { transform: rotate(-50deg); } .box:hover .brand:nth-child(16) { transform: rotate(-40deg); } .box:hover .brand:nth-child(17) { transform: rotate(-30deg); } .box:hover .brand:nth-child(18) { transform: rotate(-20deg); } .box:hover .brand:nth-child(19) { transform: rotate(-10deg); } .box:hover .brand:nth-child(20) { transform: rotate(0deg); } .box:hover .brand:nth-child(21) { transform: rotate(10deg); } .box:hover .brand:nth-child(22) { transform: rotate(20deg); } .box:hover .brand:nth-child(23) { transform: rotate(30deg); } .box:hover .brand:nth-child(24) { transform: rotate(40deg); } .box:hover .brand:nth-child(25) { transform: rotate(50deg); } .box:hover .brand:nth-child(26) { transform: rotate(60deg); } .box:hover .brand:nth-child(27) { transform: rotate(70deg); } .box:hover .brand:nth-child(28) { transform: rotate(80deg); } .box:hover .brand:nth-child(29) { transform: rotate(90deg); } .box:hover .brand:nth-child(30) { transform: rotate(100deg); } .box:hover .brand:nth-child(31) { transform: rotate(110deg); } .box:hover .brand:nth-child(32) { transform: rotate(120deg); } .box:hover .brand:nth-child(33) { transform: rotate(130deg); } .box:hover .brand:nth-child(34) { transform: rotate(140deg); } .box:hover .brand:nth-child(35) { transform: rotate(150deg); } .box:hover .brand:nth-child(36) { transform: rotate(160deg); } .box:hover .brand:nth-child(37) { transform: rotate(170deg); } .box:hover .brand:nth-child(38) { transform: rotate(180deg); } .box:hover .brand:nth-child(39) { transform: rotate(190deg); } </style> <div class="box"> <div class="brand">1</div> <div class="brand">2</div> <div class="brand">3</div> <div class="brand">4</div> <div class="brand">5</div> <div class="brand">6</div> <div class="brand">7</div> <div class="brand">8</div> <div class="brand">9</div> <div class="brand">10</div> <div class="brand">11</div> <div class="brand">12</div> <div class="brand">13</div> <div class="brand">14</div> <div class="brand">15</div> <div class="brand">16</div> <div class="brand">17</div> <div class="brand">18</div> <div class="brand">19</div> <div class="brand">20</div> <div class="brand">21</div> <div class="brand">22</div> <div class="brand">23</div> <div class="brand">24</div> <div class="brand">25</div> <div class="brand">26</div> <div class="brand">27</div> <div class="brand">28</div> <div class="brand">29</div> <div class="brand">30</div> <div class="brand">31</div> <div class="brand">32</div> <div class="brand">33</div> <div class="brand">34</div> <div class="brand">35</div> <div class="brand">36</div> <div class="brand">37</div> <div class="brand">38</div> <div class="brand">39</div> </div> html轮播图 /index.php/posts/39.html 2023-11-28T13:33:00+00:00 演示:QQ录屏20231128212554.mov<!DOCTYPE html><head> <meta charset="utf-8"> <title></title> <style type="text/css"> *{margin: 0;padding: 0;} #lunbo{ position:relative; margin: 100px auto; width: 500px; height: 150px; overflow: hidden; } #lunbo ul{ position: absolute; left: 0; top: 0; } #lunbo li{ float: left; height: 150px; width: 200px; list-style: none; } #lunbo li img{ width:200px; height: 150px; } </style> </head> <body>!!! !!! <script type="text/javascript"> window.onload=function(){ var oDiv=document.getElementById("lunbo") var oUl=document.getElementsByTagName('ul')[0] var oLi=document.getElementsByTagName('li') var timer=null oUl.innerHTML+=oUl.innerHTML oUl.style.width=oLi[0].offsetWidth*oLi.length+'px' //oul.innerHTML=oUl, innerHTML+oUl.innerHTML,与前面oUl.innerHTNL +=oUL.innerHTML一样 timer=setInterval(function(){ if(oUl.offsetLeft<-oUl.offsetwidth/2){//判断2个ul长度,如果到一半了,就Left归e oUl.style.left='0'} oUl.style.left=oUl.offsetLeft-2+'pX'//定时器改变uL的Left值。每次uL的eft都-2pX },30) //鼠标移入,停止移动 oDiv.onmousemove=function(){ clearInterval(timer) } //鼠标移出,继续移动 oDiv.onmouseout=function(){ timer=setInterval(function(){ if(oUl.offsetLeft<-oUl.offsetWidth/2){ oUl.style.left='0'} oUl.style.left=oUl.offsetLeft-2+'px' }, 30) } } </script> </body> 111 /index.php/posts/30.html 2023-11-27T09:03:00+00:00 202311271703.pdf