Implement page curl on android?

I’m doing some experimenting on page curl effect on Android using OpenGL ES at the moment. It’s quite a sketch actually but maybe gives some idea how to implement page curl for your needs. If you’re interested in 3D page flip implementation that is. As for the formula you’re referring to – I tried it … Read more

Start Activity with an animation

I am using this in a current project of mine, it is basically pretty simple. You define a new animation style in your styles.xml, like this: <!– just defines top layer “Animation” –> <style name=”Animation” /> <!– the animations must have been defined in your “anim” folder, of course –> <style name=”Animation.MyAwesomeAnimation” parent=”android:style/Animation.Activity”> <item name=”android:activityOpenEnterAnimation”>@anim/myawesomeanimation_enter</item> … Read more

Add transition while changing img src with javascript

You want a crossfade. Basically you need to position both images on top of each other, and set one’s opacity to 0 so that it will be hidden: <div id=”container”> <img class=”hidden image1″ src=”http://www.istockphoto.com/file_thumbview_approve/4629609/2/istockphoto_4629609-green-field.jpg”> <img class=”image2″ src=”http://www.istockphoto.com/file_thumbview_approve/9958532/2/istockphoto_9958532-sun-and-clouds.jpg” /> </div> CSS: .hidden{ opacity:0; } img{ position:absolute; opacity:1; transition:opacity 0.5s linear; } With a transition set for … Read more

How to change all the activity transitions at once in Android application?

You want to first create a <style> in res/styles.xml, like this: <style name=”YourAnimation.Activity” parent=”@android:style/Animation.Activity”> <item name=”android:windowEnterAnimation”>@anim/your_in_down</item> <item name=”android:windowExitAnimation”>@anim/your_out_down</item> </style> Then you can apply the style to a theme, in the same file: <style name=”YourTheme” parent=”android:Theme.Translucent”> … <item name=”android:windowAnimationStyle”>@style/YourAnimation.Activity</item> </style> And finally apply the theme to your activities in the manifest: <activity android:name=”.YourActivity” android:theme=”@style/YourTheme” /> Look … Read more

Vue.js page transition fade effect with vue-router

Wrap <router-view></router-view> with <transition name=”fade”></transition> and add these styles: .fade-enter-active, .fade-leave-active { transition-property: opacity; transition-duration: .25s; } .fade-enter-active { transition-delay: .25s; } .fade-enter, .fade-leave-active { opacity: 0 } Detailed answer Assuming you have created your application with vue-cli, e.g.: vue init webpack fadetransition cd fadetransition npm install Install the router: npm i vue-router If you … Read more

css transition opacity fade background

Wrap your image with a span element with a black background. .img-wrapper { display: inline-block; background: #000; } .item-fade { vertical-align: top; transition: opacity 0.3s; opacity: 1; } .item-fade:hover { opacity: 0.2; } <span class=”img-wrapper”> <img class=”item-fade” src=”https://via.placeholder.com/100×100/cf5″ /> </span>

CSS Transition for only one type of transform?

No! you cannot use transition only for certain value of transform like scale(2). One possible solution would be as follows: (sorry, you have to use additional html) HTML <div class=”scale”> <div class=”translate”> Hello World </div> </div> CSS div.scale:hover { transform: scale(2); transition: transform 0.25s; } div.scale:hover div.translate { transform: translate(100px,200px); }

CSS Auto hide elements after 5 seconds

YES! But you can’t do it in the way you may immediately think, because you cant animate or create a transition around the properties you’d otherwise rely on (e.g. display, or changing dimensions and setting to overflow:hidden) in order to correctly hide the element and prevent it from taking up visible space. Therefore, create an … Read more