<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Md Farid Hossain</title>
    <description>The latest articles on DEV Community by Md Farid Hossain (@developerfarid).</description>
    <link>https://dev.to/developerfarid</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F779611%2Ff130cb33-df58-4741-bfb7-5477e0bd6031.jpeg</url>
      <title>DEV Community: Md Farid Hossain</title>
      <link>https://dev.to/developerfarid</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/developerfarid"/>
    <language>en</language>
    <item>
      <title>What's a CSS Selector? How works CSS Selector?</title>
      <dc:creator>Md Farid Hossain</dc:creator>
      <pubDate>Fri, 04 Mar 2022 18:35:08 +0000</pubDate>
      <link>https://dev.to/developerfarid/whats-a-css-selector-how-works-css-selector-463h</link>
      <guid>https://dev.to/developerfarid/whats-a-css-selector-how-works-css-selector-463h</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;“Selectors are used to selecting elements in an HTML or XML document, in order to attach (style) properties to them.”&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;The most used CSS selectors are by class and by id, nevertheless, there are many selectors which you can use easily and fairly to add styles into a set of elements.&lt;/p&gt;

&lt;p&gt;Let’s take a look at all the different kinds of available selectors along with a brief description of each one of them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Selectors
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;div p → Descendant Selector&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It selects an element inside another element.&lt;br&gt;
This selects all the p elements inside of div.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div p {
  bacground-color: #fff;
  display: flex;
  text-aling: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;#user.admin / ul.class → Descendant Combinator&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can combine any selector with the descendent selector.&lt;/p&gt;

&lt;h1&gt;
  
  
  user.admin selects all elements with id="user" that also have class="admin".
&lt;/h1&gt;

&lt;p&gt;ul.list selects all ul elements that have class="list".&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#user.admin, ul.list {
  border: none;
  text-align: left;
  width: 100%;

}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;*** → The Universal Selector**&lt;/p&gt;

&lt;p&gt;You can select all the elements with the universal selector.&lt;br&gt;
div * selects any element inside all div elements.&lt;/p&gt;

&lt;p&gt;ul.something * selects every element inside all ul class="something" elements.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div * {
  color: #F8386D;
  line-height: 26px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;div + p → Adjacent Sibling Selector&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It selects an element that directly follows another element.&lt;/p&gt;

&lt;p&gt;This selects the p elements that directly follow div tag. Elements that follow another one are called siblings.&lt;/p&gt;

&lt;p&gt;span + .intro selects every element with class="intro" that directly follows a span.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;span + .intro {
  color: rgb(182,216,218);
  background: #D37C71;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;div ~ p → General Sibling Selector&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can select all siblings of an element that follow it. This is like the Adjacent Selector (div + p), but this one gets all of the following elements instead of one.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div ~ p {
  display: flex;
  align-items: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;div &amp;gt; h1 → Child Selector&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It selects direct children of an element.&lt;/p&gt;

&lt;p&gt;You can select elements that are direct children of other elements.&lt;br&gt;
div &amp;gt; h1 selects all h1 that are direct children div.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div &amp;gt; h1 {
  font-size: 16px;
  width: 100%;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;:first-child / :last-child → First, last Child Pseudo-selector&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can use these selectors to select an element that is the first child / last child element inside another element.&lt;/p&gt;

&lt;p&gt;ul li:first-child selects all first child p elements that are in a div.&lt;/p&gt;

&lt;p&gt;ul li:last-child selects the last li elements inside of any ul.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ul li:first-child {
  padding: 5em;
  margin: 0 1px 0 -4px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ul li:last-child {
  font-size: 16px;
  text-decoration: none;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;:only-child→ Only Child Pseudo-selector&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It selects any element that is the only element inside of another one.&lt;/p&gt;

&lt;p&gt;ul li:only-child selects the only li element that is in a ul.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ul li:only-child {
  color: #1264a3;
  padding: 0 12px 0 15px;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;:nth-child(A) → Nth Child Pseudo-selector&lt;/p&gt;

&lt;p&gt;It selects the nth (Ex: 1st, 3rd, 12th, etc.) child element in another element.&lt;/p&gt;

&lt;p&gt;div p:nth-child(8) selects every p element that is the 8th child of a div element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div p:nth-child(8) {
  color: #FA6887;
  height: 26px;
  width: 100%;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;:nth-last-child(A) → Nth Last Child Selector&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It selects the children from the bottom of the parent.&lt;/p&gt;

&lt;p&gt;ul li:nth-last-child(2) selects all second-to-last child elements.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ul li:nth-last-child(2) {
  display: flex;
  font-size: 16px;
  justify-content: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;:first-of-type → First of Type Selector&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It selects the first element of that type within another element.&lt;/p&gt;

&lt;p&gt;span:first-of-type selects the first span in any element.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;span:first-of-type {
  display: block;
  font-size: 18px;
  margin-top: 3rem;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;:nth-of-type(1) → Nth of Type Selector&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It selects a specific element based on its type and order in another element, either 'even' or 'odd' instances of that element.&lt;/p&gt;

&lt;p&gt;.example:nth-of-type(odd) selects all odd instances of the class=”example”.&lt;/p&gt;

&lt;p&gt;div:nth-of-type(2) selects the second instance of a div.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.example:nth-of-type(odd) {
  line-height: 1.5;
  padding: 10px 0;
  text-align: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>css</category>
      <category>selector</category>
      <category>html</category>
      <category>css3</category>
    </item>
    <item>
      <title>Sending Emails with Email Js</title>
      <dc:creator>Md Farid Hossain</dc:creator>
      <pubDate>Fri, 25 Feb 2022 11:57:31 +0000</pubDate>
      <link>https://dev.to/developerfarid/sending-emails-with-email-js-2j6p</link>
      <guid>https://dev.to/developerfarid/sending-emails-with-email-js-2j6p</guid>
      <description>&lt;h2&gt;
  
  
  Sending Emails with Email Js in React.
&lt;/h2&gt;

&lt;p&gt;This service allows us to connect our email service, build an email template and send it from JavaScript without any server code. Let’s check out the scope.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an account and choose an email service to connect with. There are the popular transactional services options available, such as Amazon SES or Mailgun, as well as personal services like Gmail or Outlook. You can also add a custom SMTP server. That’s what we’re going to do since we use Mailtrap. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--I-o2Vfbo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1132vskrtjzppow393qe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--I-o2Vfbo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1132vskrtjzppow393qe.png" alt="Image description" width="880" height="478"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an email template using the built-in editor. The editor provides plenty of options for content building and other useful features, such as auto-reply, reCAPTCHA verification, and more. It’s also necessary to understand the basics of coding your own HTML email template. For this, read our Guide on How to Build HTML Email. Once this is done, click Save.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One of the major benefits of EmailJS.com is that the typical email attributes are hidden. The template includes the recipient field and it cannot be overridden from JS, so you send the template you have configured previously.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now you need to install EmailJS SDK. This can be done with npm:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install emailjs-com --save
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The actual email sending can be carried out via two methods: emailjs.send or emailjs.sendForm. Here are the code examples for both of them:&lt;/p&gt;

&lt;h2&gt;
  
  
  emailjs.send
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var templateParams = {
    name: 'James',
    notes: 'Check this out!'
};

emailjs.send('YOUR_SERVICE_ID', 'YOUR_TEMPLATE_ID', templateParams) //use your Service ID and Template ID
    .then(function(response) {
       console.log('SUCCESS!', response.status, response.text);
    }, function(error) {
       console.log('FAILED...', error);
    });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  emailjs.sendForm
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var templateParams = {
    name: 'James',
    notes: 'Check this out!'
};

emailjs.sendForm('YOUR_SERVICE_ID', 'YOUR_TEMPLATE_ID', templateParams) //use your Service ID and Template ID
    .then(function(response) {
       console.log('SUCCESS!', response.status, response.text);
    }, function(error) {
       console.log('FAILED...', error);
    });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it in the browser and check out the Mailtrap Demo Inbox. It works!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K1E-_GFB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wtihwu2p0z85iqv6o2cv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K1E-_GFB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wtihwu2p0z85iqv6o2cv.png" alt="Image description" width="880" height="305"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing
&lt;/h2&gt;

&lt;p&gt;EmailJS offers a free subscription plan that allows you to send up to 200 emails per month using only two templates. In addition, you’ll have a limited list of contacts and email size (up to 50Kb). Higher quotas are available for paid subscriptions: Personal ($5/month), Professional ($15/month), and Business ($50/month).&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>emailjs</category>
      <category>react</category>
      <category>express</category>
    </item>
    <item>
      <title>What is CRUD?</title>
      <dc:creator>Md Farid Hossain</dc:creator>
      <pubDate>Thu, 23 Dec 2021 17:24:30 +0000</pubDate>
      <link>https://dev.to/developerfarid/what-is-crud-5ekb</link>
      <guid>https://dev.to/developerfarid/what-is-crud-5ekb</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is CRUD?&lt;/strong&gt;&lt;br&gt;
CRUD stands for Create, Read, Update, and Delete.&lt;br&gt;
Create — To insert any record to the database.&lt;br&gt;
Read — To retrieve records from the database.&lt;br&gt;
Update — To update a record in the database.&lt;br&gt;
Delete — To delete a record in the database.&lt;br&gt;
If you are new to Node and Express JS, do visit my previous blogs on Node JS, which explains the basics of Node and Express JS.&lt;/p&gt;

</description>
      <category>crud</category>
      <category>node</category>
      <category>express</category>
      <category>mongodb</category>
    </item>
    <item>
      <title>What is Custom Hook?</title>
      <dc:creator>Md Farid Hossain</dc:creator>
      <pubDate>Thu, 23 Dec 2021 17:02:34 +0000</pubDate>
      <link>https://dev.to/developerfarid/what-is-custom-hook-30ab</link>
      <guid>https://dev.to/developerfarid/what-is-custom-hook-30ab</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is Custom Hook?&lt;/strong&gt;&lt;br&gt;
Custom Hook is a JavaScript function which we create by ourselves, when we want to share logic between other JavaScript functions. It allows you to reuse some piece of code in several parts of your app.&lt;br&gt;
&lt;strong&gt;When and How to Use&lt;/strong&gt;&lt;br&gt;
When we want to share the logic between other components, we can extract it to a separate function. According to official documents, the custom hook has to:&lt;br&gt;
start with the key word use&lt;br&gt;
call other hooks&lt;br&gt;
Because custom hook is a JS function, the Rules of Hooks apply to it as well. Those are:&lt;br&gt;
Never call Hooks from inside a loop, condition or nested function&lt;br&gt;
Hooks should sit at the top-level of your component&lt;br&gt;
Only call Hooks from React functional components&lt;br&gt;
Never call a Hook from a regular function&lt;br&gt;
Hooks can call other Hooks&lt;br&gt;
How to Create Custom Hook?&lt;br&gt;
You create the hook same way as you create any JS function. Look at it as a refactoring of code into another function to make it reusable. It will speed up your productivity and save your time.&lt;br&gt;
Let's consider the following example, where we have useEffect()hook which updates the document title:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {useState, useEffect } from 'react';

    export const Counter=()=&amp;gt; {
      const [count, setCount] = useState(0);
      const incrementCount = () =&amp;gt; setCount(count + 1);
      useEffect(() =&amp;gt; {
        document.title = `You clicked ${count} times`
      });

      return (
        &amp;lt;div&amp;gt;
          &amp;lt;p&amp;gt;You clicked {count} times&amp;lt;/p&amp;gt;
          &amp;lt;button onClick={incrementCount}&amp;gt;ClickMe&amp;lt;/button&amp;gt;
        &amp;lt;/div&amp;gt;
      )
    }

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What we want to do is to create a custom hook, which accepts a piece of text and updates the document title for us. Here is how we do that:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const useDocumentTitle = (title) =&amp;gt; {
        useEffect(() =&amp;gt; {
          document.title = title;
        }, [title])
      }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our useDocumentHook() now accepts the string and calls useEffect() hook inside, which updates the document title with a given title, when the title was changed (we pass title as dependency here).&lt;br&gt;
So our final code would look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState, useEffect } from "react";

const useDocumentTitle = (title) =&amp;gt; {
  useEffect(() =&amp;gt; {
    document.title = title;
  }, [title]);
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export const Counter = () =&amp;gt; {
  const [count, setCount] = useState(0);
  const incrementCount = () =&amp;gt; setCount(count + 1);
  useDocumentTitle(`You clicked ${count} times`);

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;p&amp;gt;You clicked {count} times&amp;lt;/p&amp;gt;
      &amp;lt;button onClick={incrementCount}&amp;gt;Click me&amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
  );
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that is all, as simple as that :) In my next blog post I'll share 5 the most commonly used custom hooks, which make your development faster and easier.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>hook</category>
      <category>react</category>
    </item>
    <item>
      <title>CSS Transformations</title>
      <dc:creator>Md Farid Hossain</dc:creator>
      <pubDate>Thu, 23 Dec 2021 16:42:29 +0000</pubDate>
      <link>https://dev.to/developerfarid/css-transformations-3gjg</link>
      <guid>https://dev.to/developerfarid/css-transformations-3gjg</guid>
      <description>&lt;h2&gt;
  
  
  CSS Transformations
&lt;/h2&gt;

&lt;p&gt;CSS transformations can be split into two categories, two-dimensional and three-dimensional. We’ll look at two-dimensional transformations first. Two-dimensional CSS transformations operate on the X (horizontal) and Y (vertical) axes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS Transform: Translate&lt;/strong&gt;&lt;br&gt;
The translate() method translates, or moves, a page element up, down, left, and/or right on the page by a specified amount. In the parenthesis, the first number specifies the horizontal distance, and the second number specifies the vertical distance.&lt;br&gt;
For example, we can translate our div by a number of pixels:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transform: translate(100px, 75px);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;TranslateX():&lt;br&gt;
In addition to translate(), we also have the translateX() and translateY() methods. translateX() moves an element only horizontally, and takes one argument:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transform: translateX(100px);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;TranslateY():&lt;br&gt;
Similarly, the translateY() method moves an element vertically. It also takes just one argument:transform: translateY(100px);&lt;/p&gt;

&lt;p&gt;CSS Transform: Scale&lt;br&gt;
The scale() method changes the size of the target element. If we provide one argument, this increases or decreases the size of our div by a multiple of its original size:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transform: scale(2);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS Transform: Rotate&lt;br&gt;
The rotate() function, as you might guess, rotates an element. By default, the element will rotate around its center. We can specify the rotation in terms of degrees, radians, or turns (from 0turn to 1turn):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transform: rotate(45deg);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS Transform: Skew&lt;br&gt;
The skew() method skews, or slants, an element along its X and/or Y axes. Its arguments specify the horizontal and vertical angle of the skew, respectively.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transform: skew(50deg, -15deg);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CSS transform-origin Property&lt;br&gt;
transform-origin is another CSS property that can be used with transform. The transform-origin property changes the position of the origin, the point where the transformation starts or is based around.&lt;br&gt;
This is most clearly demonstrated with the rotate() method: We can use transform-origin to move the center point of rotation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transform: rotate(45deg);  transform-origin: top left;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CSS Transform: Perspective&lt;br&gt;
The perspective() value sets the depth of the element on the Z-axis. It toggles how “close” or “far away” the element appears. perspective() is used in conjunction with other 3D transformation methods, as we’ll see next.&lt;br&gt;
CSS Transform: rotateX() and rotateY()&lt;br&gt;
Like rotate(), the rotateX() and rotateY() values rotate our div, but “around” the X and Y-axes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;transform: perspective(500px) rotateY(40deg);
transform: perspective(500px) rotateY(60deg); 
transform: perspective(500px) rotateY(80deg);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't forget to share this post!&lt;/p&gt;

</description>
      <category>css</category>
      <category>transformations</category>
      <category>transform</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
