天天看點

html表白程式源碼_表白程式源碼html_程式員表白代碼html

📂文章目錄

  • ​​二、📚網站介紹​​
  • ​​三、🔗網站效果​​
  • ​​▶️1.視訊示範​​
  • ​​🧩 2.圖檔示範​​
  • ​​四、💒 網站代碼​​
  • ​​🧱HTML結構代碼​​
  • ​​五、🎁更多源碼​​

二、📚網站介紹

📒網站檔案方面:html網頁結構檔案、css網頁樣式檔案、js網頁特效檔案、images網頁圖檔檔案;

📙網頁編輯方面:可使用任意HTML編輯軟體(如:​

​Dreamweaver、HBuilder、Vscode 、Sublime 、Webstorm、Text 、Notepad++​

​​ 等任意html編輯軟體進行運作及修改編輯等操作)。

其中:

(1)📜html檔案包含:其中index.html是首頁、其他html為二級頁面;

(2)📑 css檔案包含:css全部頁面樣式,3D動态效果,雪花飄落等等

(3)📄 js檔案包含:頁面炫酷效果實作

三、🔗網站效果

▶️1.視訊示範

33-浪漫森林落葉鋼琴紫色3D相冊

🧩 2.圖檔示範

html表白程式源碼_表白程式源碼html_程式員表白代碼html

四、💒 網站代碼

🧱HTML結構代碼

<!DOCTYPE html>
<html lang="en">
<head>

<audio autoplay="autoplay" loop="loop">
<source src=" 剛好遇見你.mp3" type="audio/mpeg">
</audio>

  <meta charset="UTF-8">
  <title>緻青春</title>
  <style>*{margin: 0;padding: 0;}
    html,body{height: 100%;}

    body{
      
      display: flex;
      
      perspective: 1000px;
      transform-style: preserve-3d;
      background-image: url(images/star.jpg);
      height:100%;
      width: 100%;
    }

    #box{
      position: relative;
      display: flex;
      width: 130px;
      height: 200px;
      margin: auto;
      transform-style: preserve-3d; 
      transform: rotateX(-10deg);
    }
    #box > div{
      transform-style: preserve-3d; 
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      line-height: 200px;
      font-size: 50px;
      text-align: center;
      box-shadow:0 0 10px #fff;
      -webkit-box-reflect:below 10px -webkit-linear-gradient(top,rgba(0,0,0,0) 40%,rgba(0,0,0,.8) 100%);
    }
    /*  #box > div:nth-child(1){
          background: skyblue;
          transform: translate3d(0,0,300px) rotateY(45deg);
        }
        #box > div:nth-child(2){
          background: pink;
          transform: rotateY(0deg);
        }
        #box > div:nth-child(3){
          background: purple;
          transform: translate3d(0,0,300px) rotateY(-45deg);
        } 
    */
    #box p{
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      right: 0;
      margin: auto;
      width: 1200px;
      height: 1200px;
      background: -webkit-radial-gradient(center center,600px 600px,rgba(50,50,50,1),rgba(0,0,0,0));
      border-radius: 50%;
      transform: rotateX(90deg) translate3d(-600px,0,-105px);
    }</style>
</head>
<body>
<div id="box">
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div>
  <div></div><div></div>
  <p></p>
</div>
<script>setTimeout(init,100);
function init(){
  var obox = document.getElementById('box'),
    aDiv = obox.getElementsByTagName('div');
    
    for (var i = 0; i < aDiv.length; i++) {
      aDiv[i].style.background = "url(images/"+(i+1)+".jpg) center/cover";
      aDiv[i].style.transform = "rotateY("+(i*36)+"deg) translate3d(0,0,350px)";
      aDiv[i].style.transition = "transform 1s "+(aDiv.length-i)*0.2+"s";
    }
  var sX,
    sY,
    nX,
    nY,
    desX = 0,
    desY = 0,
    tX = 0,
    tY = 10,
    index = 0;//滾輪初始值
  document.onmousedown = function(e){
    clearInterval(obox.timer);
    e = e || window.event;
    var sX = e.clientX,
      sY = e.clientY;
      this.onmousemove = function(e){
        e = e || window.event;
        var nX = e.clientX,
          nY = e.clientY;
           // 目前點的坐标和前一點的坐标內插補點
          desX = nX - sX;
          desY = nY - sY;
                    tX += desX*0.1; 
                    tY += desY*0.1;

          obox.style.transform = "rotateX("+(-tY)+"deg) rotateY("+tX+"deg)";
          sX = nX;
          sY = nY;
      }
      this.onmouseup = function(){
        this.onmousemove = this.onmouseup = null;
        obox.timer = setInterval(function(){
          desX *= 0.95;
          desY *= 0.95;
          tX += desX*0.1;
          tY += desY*0.1;
          obox.style.transform = "rotateX("+(-tY)+"deg) rotateY("+tX+"deg)";
          if (Math.abs(desX)<0.5 && Math.abs(desY)<0.5) {
            clearInterval(obox.timer);
          }
        },13);
      }
    return false;
  }
  //滾輪放大縮小
  mousewheel(document,function(e){
    e = e || window.event;
    var d = e.wheelDelta/120 || -e.detail/3;
      if (d>0) {
        index-=20;
      }else{
        index+=30;
      }
      (index<(-1050)&&(index=(-1050)));
    document.body.style.perspective = 1000 + index + "px";
  })
  function mousewheel(obj,fn){
    document.onmousewheel===null?obj.onmousewheel=fn:addEvent(obj,"DOMMouseScroll",fn)
  }
  function addEvent(obj,eName,fn){
    obj.attachEvent?obj.attachEvent("on"+eName,fn):obj.addEventListener(eName,fn);
  }
}</script>
</body>
</html>      

五、🎁更多源碼

1.如果我的部落格對你有幫助 ​

​請 “👍點贊” “✍️評論” “💙收藏” ​

​一鍵三連哦!