Color&Image Changes on Tabs and creating them with Sass-Scss

in #utopian-io6 years ago

Color_Image_Changes_on_Tabs.gif


Repository

https://github.com/sass/sass

What Will I Learn?

  • You will learn how to change colors on tabs with its own color.
  • You will learn how to change this effect to image transition on tabs.
  • You will learn how to use nth-child() function and what it does.
  • You will learn how to define an animation with scalY() function.
  • You will learn how to combine functions with different objects.

Requirements

  • Any text editor. (Brackets, Atom, Notepad++)
  • Basic HTML knowledge
  • Basic SCSS code knowledge
  • SASS installed.
  • Local server (Wampserver)
  • Any browser

Resources

Difficulty

  • Intermediate

Description

In this tutorial we will create a box with different color tabs in it and with hover function we will change its color. We will do the same thing also with images. If you follow this tutorial download all files from my github page and change the values. You can use comment mark(/*between these marks*/) to deactivate codes and test it. With this way it will be more useful for you and you can test and understand the codes better.


1- Before you start be sure that you run our sass code in the directory of site files. Our command is sass --watch sass:css. It will translate all codes that you write in scss file to css file. After that, write a basic html file on root directory and into body section 1 division for our list. And for each list create a division with a class.



2- On our scss file we are setting a background to our body. After that we style our mainbox with bg as aqua its size as 600x400 and with other codes we are centering it to our page.


3- As second step we are defining our tabs with styling our ul. With its margin we bring its position just above the mainbox with same width. After that we define little boxes in it with styling li and we define a bg color to see the changes.


4- Now we have our boxes but its not visible at all so we define a border for each of them with hover so that we can see them.


5- In this part we are styling all of our child lists and we use here nth-child() function. Each child number belongs to following li object. We define here just color that we want and they will be visible on tabs only.


**7- Here we are defining the size of our lists so that can cover whole mainbox with it. But with scaleY() function we are making it invisible and we define there a delay for our hover effect. And with hover effect we are making them visible with scaleY(1) and it wil start to be visible from top.


7- And finally our end work...

Color_Image_Changes_on_Tabs.gif


Video Tutorial


Curriculum


Proof of Work Done

https://github.com/omersurer/Sass-Scss-Tutorials/tree/master/Color_Image_Changes_on_Tabs

Sort:  

Thank you for your contribution @omersurer.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Hey @omersurer
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.032
BTC 61227.60
ETH 3022.96
USDT 1.00
SBD 3.88