我正在尝试将动画制作为涟漪效果。它似乎在 chrome 浏览器上运行良好,但在 safari 上不起作用,我在同一页面中还有其他动画,它们在 chrome 和 safari 上都运行良好,但不是这个。我想知道我做错了什么。
我尝试调试它,我可以看到 Safari 图形选项卡中有一条消息说
“这个动画没有关键帧”
我的CSS代码:
.ripple-animation {
&::after {
@include rings(2s, 40s);
}
&::before {
@include rings(2s, 40s);
}
}
@mixin rings($duration, $delay) {
opacity: 0.5;
// display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
position: absolute;
top: -8px;
left: -10px;
right: 0;
bottom: 0;
content: '';
height: 120%;
width: 110%;
border: 4px solid rgba(0, 0, 0, 0.4);
border-radius: 100%;
-webkit-animation-name: ripple;
-webkit-animation-duration: $duration;
-webkit-animation-delay: $delay;
-webkit-animation-iteration-count: infinite;
-webkit-animation-timing-function: cubic-bezier(.65, 0, …Run Code Online (Sandbox Code Playgroud) 当我点击离子背景时,如何让我的弹出窗口关闭.这是我的代码.我是离子和角度js的新手.下面的代码允许我打开一个弹出窗口,当我点击按钮时,我弹出了弹出窗口.我想这样做,因为当我点击背景它应该让我到主页.
$scope.showPopup = function() {
$scope.data = {}
// An elaborate, custom popup
var myPopup = $ionicPopup.show({
title: 'Social Media Services',
scope: $scope,
buttons: [
{
type :'ion-social-facebook positive button-large',
onTap: function(e) {
// $cordovaSpinnerDialog.show("aaa", "aaaa");
window.open('https://www.facebook.com/BinDawood.Co', '_system', 'location=yes');
}
},
{ type :'ion-social-twitter calm',
onTap: function(e) {
// $cordovaSpinnerDialog.show("aaa", "aaaa");
window.open('https://twitter.com/BinDawoodco', '_system', 'location=yes');
}
},
{ type :'ion-social-pinterest assertive',
onTap: function(e) {
// $cordovaSpinnerDialog.show("aaa", "aaaa");
window.open('http://pinterest.com/bindawoodco', '_system', 'location=yes');
}
},
]
});
myPopup.then(function(res) {
console.log('Tapped!', res);
});
};
Run Code Online (Sandbox Code Playgroud)
如何修改我的代码才能实现这一目标?
<html>
<input type="file" name="Image">
</html>
<script>
fabric.Image.fromURL('image.jpg', function(img) {enter code here
var oImg = img.set({ left: 50, top: 100, angle: 00 }).scale(0.9);
canvas.add(oImg).renderAll();
canvas.setActiveObject(oImg);
});
</script>
Run Code Online (Sandbox Code Playgroud)
我试图通过输入标签从硬盘上传图像文件.这是我的示例代码.告诉我如何更改此脚本以便我可以从输入中选择图片.