background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "Create Transitions/Animations on Page Load with HTML & CSS - Web Design Tutorial"

input logo icon
Video tags
|

Video tags

code
coding
programming
tutorial
introduction
beginner
walkthrough
guide
software
development
simple
easy
into
english
with
example
examples
developer
lecture
recording
web
website
app
application
css
css3
html
html5
animate
animation
keyframes
keyframe
property
properties
navigation
bar
fade
rotate
transform
smooth
in
out
cubic
beizer
webdev
dcode
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:01
hey guys hey John my name is Tom and in
00:00:04
this video we're gonna be looking at how
00:00:06
to create a transition on page load
00:00:08
using CSS so this one here is the final
00:00:12
result I have this simple web page if I
00:00:15
was to click on this home button and we
00:00:18
get a nice little animation when the
00:00:20
content loads up so once again back on
00:00:23
the about page we can see we get a
00:00:25
subtle transition or animation as the
00:00:28
content loads up and this is very simple
00:00:30
to achieve and it requires just a little
00:00:33
bit of CSS and I think it makes the
00:00:36
websites look a lot better it gives it a
00:00:38
bit of punch a bit of flavor and
00:00:40
definitely definitely a good pick for
00:00:43
commercial websites and I use this
00:00:46
basically for all of my projects from
00:00:48
now on so let's go inside this tab right
00:00:51
here and here I have essentially the
00:00:54
same content as before but this time of
00:00:57
course we have no animation so let's go
00:00:59
ahead now and implement the transition
00:01:01
slash animation on this particular
00:01:04
webpage right here let's go inside the
00:01:07
text editor and take a look at the
00:01:09
current structure so I've got here the
00:01:11
index.html page it's yet a home page and
00:01:15
I have here a CSS file included called
00:01:19
master CSS and this is going to be
00:01:21
included on all of the pages and it's
00:01:24
going to contain all of the code for the
00:01:27
transition okay so of course this has to
00:01:31
be included on all the pages that way
00:01:33
every single page has the transition
00:01:37
effect working all right and down here
00:01:40
we have just all of these sample content
00:01:42
a few paragraphs and also of course the
00:01:45
navigation bar inside the about HTML
00:01:48
file once again we include the master
00:01:51
CSS file of course very important to
00:01:54
this particular effect and then here we
00:01:57
have just an image instead of the third
00:02:00
paragraph of sample text so a very
00:02:02
simple dummy sample content going on
00:02:06
right here so let's go inside the master
00:02:08
CSS file and begin on the transition
00:02:11
effects okay so the
00:02:13
first thing to do is to define some key
00:02:16
frames we're going to define what
00:02:17
actually happens for the animation to
00:02:21
work so what is the actual animation so
00:02:24
let's say key frames and right here so
00:02:26
you say at key frames then specify the
00:02:29
name of your key frame so we can say
00:02:31
transition in for example inside here we
00:02:36
can say from and then to so basically
00:02:39
we're going to be defining some CSS
00:02:42
properties inside both the from and to
00:02:45
essentially the transition involves
00:02:48
going from these properties to these
00:02:51
properties here so let's go inside the
00:02:54
from section and say opacity 0 and
00:02:58
transform to be rotate X negative 10
00:03:04
degrees so when the page loads up which
00:03:07
ever element we apply this keyframe set
00:03:12
to the element is gonna go from these
00:03:16
particular values to these ones inside
00:03:19
here so I'm going to copy and paste this
00:03:22
stuff right here
00:03:23
and change the opacity to 1 and say
00:03:26
transform rotate to be 0 so essentially
00:03:32
we're going from a morphed or a changed
00:03:35
value to the default values which are
00:03:40
readable by the user so this is the main
00:03:44
part of this effect ok so now we just
00:03:48
need to apply this this set of rules to
00:03:51
a particular element so let's go back
00:03:54
inside the index page and I've got here
00:03:57
a container class which surrounds all of
00:04:01
the main content and this does not
00:04:03
include the navigation bar and the title
00:04:06
so the reason for that is that way the
00:04:09
heading or the title and the navbar
00:04:12
remain solid as the content changes and
00:04:15
I think that looks a bit better as
00:04:18
opposed to the entire content changing
00:04:20
alright so let's go back inside the CSS
00:04:22
file and target the class of campaign
00:04:25
inside here we can say animation we can
00:04:30
say transition in at 0.75 seconds so
00:04:34
basically all of this content inside
00:04:36
here inside the container div is gonna
00:04:40
take three-quarters of a second to go
00:04:43
from these values to these values here
00:04:47
alright so I can save this and refresh
00:04:50
the browser and we have the final result
00:04:53
so of course you to saw it follows to
00:04:56
change pages we get the nice little
00:04:59
animation appearing as the content loads
00:05:01
up now of course if you want the entire
00:05:04
page to do that including the title and
00:05:07
the navigation bar we can easily go
00:05:10
inside here and change this to be body
00:05:12
and now the entire body is gonna have
00:05:15
the transition animation effect so I can
00:05:18
save this and refresh and now of course
00:05:20
the whole body has the effect so I don't
00:05:23
you you may like this better you may
00:05:26
like the content better I personally
00:05:28
like the content changing only better
00:05:31
but that's just me so I've also got a
00:05:33
second kind of animation that a lot to
00:05:36
use and this basically just involves
00:05:38
going back inside here and changing the
00:05:40
transform to be translate one as being
00:05:45
negative 10px and changing this to be a
00:05:50
course once again back down to zero so
00:05:52
now of course it's gonna go from a from
00:05:55
a sort of higher position and then fade
00:05:59
downwards as it obviously fades in so
00:06:01
now I can save this and refresh and we
00:06:04
have a different start of effect as the
00:06:07
content loads up so once again also I
00:06:09
think quite a nice animation and that is
00:06:12
how you can do very simple transitions
00:06:13
on page load using some CSS thanks for
00:06:17
watching and I'll see you later

Description:

In this video we're going to be looking at how to create a simple transition/animation on page load using some really basic CSS. Support me on Patreon: https://www.patreon.com/dcode - with enough funding I plan to develop a website of some sort with a new developer experience! Follow me on Twitter @dcode! If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "Create Transitions/Animations on Page Load with HTML & CSS - Web Design Tutorial" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "Create Transitions/Animations on Page Load with HTML & CSS - Web Design Tutorial" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "Create Transitions/Animations on Page Load with HTML & CSS - Web Design Tutorial" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "Create Transitions/Animations on Page Load with HTML & CSS - Web Design Tutorial" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "Create Transitions/Animations on Page Load with HTML & CSS - Web Design Tutorial"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "Create Transitions/Animations on Page Load with HTML & CSS - Web Design Tutorial"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.