在线求助PS+IR制作翻页式生日贺卡

发布网友 发布时间:2022-04-24 06:22

我来回答

2个回答

懂视网 时间:2022-04-23 17:55

效果如下:拖动翻阅卡片,或点击‘下一张’翻阅卡片效果

<!DOCTYPE html>
<html>
<head>
 <meta charset="UTF-8">
 <meta name="viewport" content="width=0, user-scalable=0">
 <title>Document</title>
 <style>
 .containt{position:absolute; top:0; bottom:0; left:0; right:0; overflow:hidden;}
 ul,li{margin:0; padding:0;}
 ul{position:absolute; left:100px; right:100px; top:150px; bottom:200px;}
 ul>li{list-style:none; display:none; position:absolute; top:0; left:0; width:100%; height:100%; border-radius: 15px; overflow:hidden; box-shadow:0 20px 40px rgba(0,0,0,0.1); background:#f6f6f6; transition:.3s; -webkit-transition:.3s; cursor:pointer;}
 ul>li img{width:100%;}
 ul>li:nth-child(1){display: block; z-index:2;}
 ul>li:nth-child(2){display: block; transform:matrix(0.95,0,0,1,0,-20); -webkit-transform:matrix(0.95,0,0,1,0,-20); z-index: 1;}
 ul>li:nth-child(3){display: block; transform:matrix(0.9,0,0,1,0,-40); -webkit-transform:matrix(0.9,0,0,1,0,-40); z-index: 0;}
 ul>li>.content{height:100%; width: 100%;}
 ul>li:nth-child(2)>.content{opacity:0.9;}
 ul>li:nth-child(3)>.content{opacity:0.8;}
 .footer{position: absolute; display:flex; display:-webkit-flex; bottom:0; left:0; right:0; height:150px; -webkit-align-items:center; -webkit-justify-content:center; text-align: center;}
 .footer .button{width:80px; height:80px; line-height: 80px; background:#000; border-radius: 50%; color:#fff;}
 </style>
</head>
<body>
 <p>
 <ul>
  <li>
  <p background-image="">
   <img src="http://y.gtimg.cn/music/photo_new/T001R150x150M000002J4UUk29y8BY.jpg">
  </p>
  </li>
  <li>
  <p>
   <img src="http://y.gtimg.cn/music/photo_new/T001R150x150M0000025NhlN2yWrP4.jpg">
  </p>
  </li>
  <li>
  <p>
   <img src="http://y.gtimg.cn/music/photo_new/T001R150x150M000004AlfUb0cVkN1.jpg">
  </p>
  </li>
  <li>
  <p>
   <img src="http://y.gtimg.cn/music/photo_new/T001R150x150M000003Nz2So3XXYek.jpg">
  </p>
  </li>
  <li>
  <p>
   <img src="http://y.gtimg.cn/music/photo_new/T001R150x150M000001BLpXF2DyJe2.jpg">
  </p>
  </li>
  <li>
  <p background-image="">
   <img src="http://y.gtimg.cn/music/photo_new/T001R150x150M000002J4UUk29y8BY.jpg">
  </p>
  </li>
 </ul>
 <p>
  <p>下一张</p>
 </p>
 </p> 
 <script src="../js/jquery-3.2.0.min.js"></script>
 <script>
 window.onload = function(){
 var pos = {};
 var distance_pos = {};
 var transition;
 var touchStart = function(e){
  var event = e ? e : window.event;
  var touch = event.touches[0];
  var target = event.target || event.srcElement;
  transition = target.style.transition;
  pos = {
  x: touch.pageX,
  y: touch.pageY
  }
  this.addEventListener('touchmove', touchMove, false);
  this.addEventListener('touchend', touchEnd, false);
 }
 var touchMove = function(e){
  var event = e ? e : window.event;
  var touch = event.touches[0];
  if($("li").length<2){
  alert("已经是最后一张了");
  this.removeEventListener('touchstart', touchStart, false);
  this.removeEventListener('touchmove', touchMove, false);
  this.removeEventListener('touchend', touchEnd, false);
  return false;
  }
  distance_pos = {
  x: touch.pageX - pos.x,
  y: touch.pageY - pos.y
  }
  this.style.transition = 'none';
  this.style.webkitTransition = 'none';
  this.style.left = `${distance_pos.x}px`;
  this.style.top = `${distance_pos.y}px`;
 }
 var touchEnd = function(e){
  var event = e ? e : window.event;
  this.style.transition = transition;
  this.style.webkitTransition = transition;
  if(Math.abs(distance_pos.x) > Math.abs(distance_pos.y)){
  //水平滑动
  if(distance_pos.x < -50){
   // 向左滑出
   this.style.left = '-0px';
   removeTouchEvent(this)
  }else if (distance_pos.x > 50) {
   // 向右滑出
   this.style.left = '0px';
   removeTouchEvent(this)
  }else{
   this.style.top = '0px';
   this.style.left = '0px';
  }
  }else{
  //垂直滑动
  if(distance_pos.y < -50){
   // 向上滑出
   this.style.top = '-150%';
   removeTouchEvent(this)
  }else if (distance_pos.y > 50) {
   // 向下滑出
   this.style.top = '150%';
   removeTouchEvent(this)
  }else{
   this.style.top = '0px';
   this.style.left = '0px';
  }
  }
  this.removeEventListener('touchmove', touchMove, false);
  this.removeEventListener('touchend', touchEnd, false);
 }
 var listenTouchEvent = function(){
  $("li")[0].addEventListener('touchstart',touchStart,false)
 }
 var removeTouchEvent = function(el){
  setTimeout(function(){
  $(el).remove();
  listenTouchEvent()
  },300)
 }
 listenTouchEvent()
 $(".button").click(function(){
  var element = $("li")[0];
  if($("li").length<2){
  return;
  }
  element.style.transform = 'translate(0px,0px)';
  removeTouchEvent(element);
 })
 }
 </script>
</body>
</html>

热心网友 时间:2022-04-23 15:03

如果对ps还不能熟练运用的话,就要多用其他地方的素材来组合了(熟练的话自己做素材)。可以去office word剪贴画看看,再一点合适的素材,拼贴一下(主要是蛋糕,蜡烛之类),注意混合模式。颜色要丰富(用曲线),也要协调(用渐变),能融合成一个主体最好,下面的最关键:写上你真心的祝福语。相比做一张图,写一段文字应该更容易,而且多年以后人家对这张贺卡印象最深的应该是文字(除非你做的图很有创意,很精美)。字多字少没关系,主要是做得温馨一点,放在显眼的地方。
在窗口打开动画栏,建几个蜡烛闪闪发光之类的帧效果更好。
网上贺卡一大堆,自己做的更温馨,更能表达你真切的祝福。
有问题再联系。

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com