translate-animation

Why is my CSS3 animation not working in Chrome or Safari?

坚强是说给别人听的谎言 提交于 2020-07-06 04:59:32
问题 I'm using a translate animation, but it doesn't work in Safari or Chrome. What am I doing wrong? Here's my code, and a JSFiddle of it in action: HTML <div id="animate"></div> CSS #animate { position: absolute; top: 100px; left: 30px; width: 100px; height: 100px; border-radius: 10%; background: gray; -webkit-animation:move 6s ease infinite; -moz-animation:move 6s ease infinite; animation: move 6s ease infinite; } @keyframes move { 50% { transform: translate(800px, 0px); } } @-webkit-keyframes

Why is my CSS3 animation not working in Chrome or Safari?

折月煮酒 提交于 2020-07-06 04:58:13
问题 I'm using a translate animation, but it doesn't work in Safari or Chrome. What am I doing wrong? Here's my code, and a JSFiddle of it in action: HTML <div id="animate"></div> CSS #animate { position: absolute; top: 100px; left: 30px; width: 100px; height: 100px; border-radius: 10%; background: gray; -webkit-animation:move 6s ease infinite; -moz-animation:move 6s ease infinite; animation: move 6s ease infinite; } @keyframes move { 50% { transform: translate(800px, 0px); } } @-webkit-keyframes

Translate animation code

喜你入骨 提交于 2020-01-06 14:07:54
问题 I am a noob coming from a PHP background so kindly excuse me if this is too basic a question. Basically, this is what I want to do: make an image animate/drop from the top of the screen to 25% down in 5 seconds so I googled and ended up on: http://developer.android.com/reference/android/view/animation/TranslateAnimation.html the problem is I cannot find any sample code there (like in php you can type a function, eg: php.net/explode and it shows you an example with explode(), but here for a

onClickListener not triggered during animation

不想你离开。 提交于 2020-01-04 04:30:17
问题 I have followed this answer to animate an imageview. The animation works perfect. But I had added an onClickListener to the imageview. The onClickListener works perfectly when the image is at rest, that is not animating. But while animating, the imageview doesn't trigger the onClickListener action. What is the problem here? How can I rectify it? Please help me out. 来源: https://stackoverflow.com/questions/23947114/onclicklistener-not-triggered-during-animation

How to animate just one Activity when Activity change?

痞子三分冷 提交于 2020-01-01 19:36:52
问题 When change from Ativity A to Activity B and viceversa I want that only Activity B to animate, but in my case Activity A also animates.(leaving a blank space in the left of the screen) Activity B animation is working well, my problem is with the animation of Activity A .(which shouldn't exists). I have set //Activity B @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); overridePendingTransition(R.anim.fadein, R.anim.fadeout); setContentView(R

rotate image with css

大憨熊 提交于 2020-01-01 08:02:20
问题 I would like to rotate an image by 90 degrees with CSS only. I can do the rotation, but then the position of the image is not what it should be. First, it will overlay some other elements in the same div, and second, its vertical dimension will become bigger than the containing div. Here is my code where the two classes are defined. .imagetest img { transform: rotate(270deg); -ms-transform: rotate(270deg); -moz-transform: rotate(270deg); -webkit-transform: rotate(270deg); -o-transform: rotate

How a Translate Animation works: Android

妖精的绣舞 提交于 2019-12-30 06:55:26
问题 I'm trying to move a RelativeLayout using TranslateAnimation . Code I have written for performing the same is: translateAnimation = new TranslateAnimation(0, 0, heightOfRootView-excuseContainer.getHeight(), currentYPoint); translateAnimation.setRepeatMode(0); translateAnimation.setDuration(500); translateAnimation.setFillAfter(true); excuseContainer.startAnimation(translateAnimation); I'm trying to start animation from current y position of particular view (I do not need to change x position

Android - Repeat Scrolling Panoramic Photo Seamlessly Across Background

爷,独闯天下 提交于 2019-12-24 08:38:58
问题 I've been playing around with Java for sometime but I am fairly new to android development and still have lots to learn. I'm building an app for my toddler and would like to scroll a panoramic photo of a sky with clouds across the background of the home screen. I started with ImageView and TranslateAnimation which has the image scroll left to right without repeating. Also, it only shows as much of the image as will fit in the width of the screen. Am I going about this the wrong way? Please

Top to bottom - translate animation

帅比萌擦擦* 提交于 2019-12-22 06:49:36
问题 Need to make next animation (on android 2.2 and above): 1.Moving button from top to bottom (after clicking on him), 2.Moving back from bottom to top (After clicking on him again). First animation works fine, but the second not, the btn "jumps" from bottom to top and not animate. Code: public class MainActivity extends Activity { static RelativeLayout relativeLayout; static Button btn; static Boolean isUp = true; public void onCreate(Bundle savedInstanceState) { super.onCreate

How to translate animation on an image diagonally?

不打扰是莪最后的温柔 提交于 2019-12-21 07:58:15
问题 I want to animate an image diagonally like below picture. I have tried translate animation but I am only able to do it either parallel X-axis or parallel Y-axis. But couldn't able to figure out how to do it diagonally. And I am also not sure it can be done by translate animation or some other kinda animation. So please suggest me how can I do it or if any one can give me a helpful link then also I will be obiliged. 回答1: One way is to use an AnimatorSet to play more ObjectAnimator together.