Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Friday, 26 October 2018

Java program for building maximum possible time from 9 digit (TCS codevita question )

This is solution for TCS codevita practice round question, According to the question we have to get 9 digit input from user and for a maximum possible time ,if possible.

Thursday, 20 July 2017

Animation with HTML line tag and CSS @keyframes having beautiful look by Code4animate


Animation with html and css coding.

This animation is created with line tag and its color is changed with @keyframes .




What you need for creating animation like above.


  • Basic knowledge of html and css.
  • Text editor like notepad , better if you use Standard code editor.

Old animation related to this animation
1. A animation with html tag used for creating a line and circle
2. New edition of Animation with html and css (line, animate and and css property) - top4ways
3. Animation with html and css (line, animate and and css property) - top4ways

Lets start coding to create animation like this one.


Step first:- Open an text editor and write the basic structure of html5 and start coding as in step below
Step second :- Now create svg elements and define its height and width ( In this animation height=600 and width=600). As in below code

Step third :-Now create line tags for this animation as in below code

x1 and y1 defines the start point of line and x2 and y2 define ending point of line.

Step fourth: - Now define css for changing the color of line for this animation as in below code



Step fifth :- Now combine and save this codes in a right way and Run it on browser.

Saturday, 8 July 2017

Animation with html and css coding like div, keframes and more by code4animate


Animation with html and css coding. This animation is created with 60 div element placed in a line and each div has an id="dsa1" but different class name (d1,d2,d3.........da60).


What you need for creating animation like above.
  • Basic knowledge of html and css.
  • Text editor like notepad , better if you use Standard code editor.

This animation is new version of Animation with div tag of html and css coding by top4ways
Lets start coding to create animation like this one.
Step first:- Open an text editor and write the basic structure of html5 and start coding as in step below
Step second :- Now create div elements and give same class name to all div and different id to all.and again create equal number of div tag with another class name for all and different id name. As in below code

Step third :- Now create stylesheet with style tag and define appearance of div by selecting id and class name as in below code.

Step fourth: - Now define css for animating div as in below code.

Step fifth :- Now combine and save this codes in a right way and Run it on browser.

Thursday, 15 June 2017

Animation with html tag circle and rect and @keyframes css property by top4ways



What you need for this animation :-
●Basic knowledge of html and css.
●Text editor like Notepad, Better if you use any code editor.

List of html tags and css used
  1. circle
  2. style
  3. svg
  4. rect

Lets start coding for creating above animation :-
Step first: Create an svg elements and define its height and width.
Step second : create a rect tag with id or class and then create five circle tag with different id or class. As in below code: -

Step third: - After completing second step create a style tag and define cx , cy , fill and r of circle by selecting id or class name one by one for all circle.
Step fourth: - After completing third step define @keyframe for all circle and define value you want to chane with time.
After completing all the step the code looks like the below code: -

Step fifth: - Save this text file with html extension and run it on any html supported browsers.

Saturday, 10 June 2017

Animation with div svg circle and animate tags


The below animation is created with the help of html5 and css.
Take a look to the animation first.




What you need for this animation ?
  • Basic knowledge of html and css.
  • Text editor like Notepad, Better if you use code editor.



Lets start coding for creating above animation.
List of html tags used in above animation.
    Tag used
  • div used 4 times
  • svg used 4 times
  • circle used 20 times
  • style
  • animate used 20 times

Method to create above animation :-
Step first: Create four div tags with different id or class name.
Step second : Create one-one svg elements between each div element. And define its height and width and create 5 circle between each svg elements. Then the code look like the below code: -

Step third: Now we will define the css for the whole code to make the animation complete. As the below code :-
Step fourth: Now place the code from second step inside the body tag and code from third step inside the style tag in below format for completing the above animation.

Step fifth : Save the code in html extension and run it on any html support browser.
If you have any problems in saving this animation file. You can download it just click on the download botton.

Thursday, 8 June 2017

New edition of Animation of circle with the help of html5 and css




what should you have?
● Basic knowledge of html and css.
● Any text editor better if you use any code editor.

Method to create this animation.
step first: For creating a circle on any html page we have to define an svg (scalable vector graphics) first and define its height and width. For this animation i have set the value of height equal 600 and width equal to 600. 
second step: Create circle by using circle tag and define there position on x-axis and y-axis by cx and cy respectively.  The circle will appear on top other circle or any other elements which are coded first. For example

Third step :- First take a look to this post , so you can understand how to create circle with animation as in the above animation.Click here
Forth step :- The code for making animation of circle for the above animation is below.

Fifth step : Now create an div tag and give a class attribute to it ( div_box in my case)and place the above code inside it.and Then apply the following style code to it.

Your animation is complete. If you have any problems in creating this code you can download it for free from here :-
Download this animation file

Wednesday, 7 June 2017

Make a table fan with html and css


Animate html tag to make a table fan with the help of css and html.
What you need to make this animation with coding.
# Basic knowledge of html and css.
# Text editor like Notepad. Better if you use any code editor.

List of html tags used
  1. polyline
  2. animate
  3. div
  4. svg
  5. circle
  6. style


Method to make this table fan animation
First Step : Create an div tag and define its height and width with value so the blade of the fan can cover almost the entire area. Because we will rotate the whole div tag so the blades appear to be rotating. Give an class name to this div. After creating div tag create an svg element inside this tag and define its height and width with value of 100%

Step second : Second Step : Now write a new tag polyline inside the svg and make a plus symbol with center. Again create polyline tag and make another plus symbol so the line of both sing make 45° angle.

The look like this after completing the above Step:


Step third : Now create another two div elements and give class name rode and stand.
Step fourth: Lets complete the last step , in this step you have to create an style sheet or create style tag in the above code file. As in below code:--



Now save this text file in html format and run it on your browser.
Download this animation html file

Saturday, 13 May 2017

Animation of circle with the help of html5 and css