-->

ABOUT US

Our development agency is committed to providing you the best service.

OUR TEAM

The awesome people behind our brand ... and their life motto.

  • Kumar Atul Jaiswal

    Ethical Hacker

    Hacking is a Speed of Innovation And Technology with Romance.

  • Kumar Atul Jaiswal

    CEO Of Hacking Truth

    Loopholes are every major Security,Just need to Understand it well.

  • Kumar Atul Jaiswal

    Web Developer

    Techonology is the best way to Change Everything, like Mindset Goal.

OUR SKILLS

We pride ourselves with strong, flexible and top notch skills.

Marketing

Development 90%
Design 80%
Marketing 70%

Websites

Development 90%
Design 80%
Marketing 70%

PR

Development 90%
Design 80%
Marketing 70%

ACHIEVEMENTS

We help our clients integrate, analyze, and use their data to improve their business.

150

GREAT PROJECTS

300

HAPPY CLIENTS

650

COFFEES DRUNK

1568

FACEBOOK LIKES

STRATEGY & CREATIVITY

Phasellus iaculis dolor nec urna nullam. Vivamus mattis blandit porttitor nullam.

PORTFOLIO

We pride ourselves on bringing a fresh perspective and effective marketing to each project.

Showing posts with label css cascading style sheet. Show all posts
Showing posts with label css cascading style sheet. Show all posts
  • How to implement css when onClick event occur in Reactjs

     

    How to implement css when onClick event occur in Reactjs

     

     

    How to implement css when onClick event occur in Reactjs

     

    In ReactJS, you can implement CSS changes on an onClick event by using state to manage the CSS styles and then updating that state when the event occurs. Here's a step-by-step guide:


    1.Create a React component:

     

    import React, { useState } from "react";
    
    import "./CSSViaOnClick.css";
    function CSSviaOnClick() {
      const [isClicked, setIsClicked] = useState(false);
    
      const handleClick = () => {
        // Update the state when the button is clicked www.hackingtruth.in 
        setIsClicked(!isClicked);
      };
    
      // Define CSS classes based on the state www.kumaratuljaiswal.in
      const buttonClass = isClicked ? "clicked" : "unclicked";
    
      return (
        <div>
          <div className="main-div">
            <button onClick={handleClick} className={buttonClass}>
              Click me
            </button>
          </div>
        </div>
      );
    }
    
    export default CSSviaOnClick;
    
    

     

     

    How to implement css when onClick event occur in Reactjs

     

    1. First of all we are written and import the two pkg first one is react and another one is css file.

    2. In this example, we create a functional component App that uses the useState hook to manage the isClicked state. Initially, it's set to false.

    3. We define a handleClick function that will be called when the button is clicked. Inside this function, we update the isClicked state using setIsClicked, toggling it between true and false with each click.

    4. Based on the isClicked state, we determine the CSS class to apply to the button. In this case, we have two CSS classes: 'clicked' and 'unclicked', which you can define in your CSS or use CSS-in-JS libraries like styled-components.

    5. Finally, we render the button with the onClick event handler and the appropriate CSS class.

     

     

    Implement CSS

     

     

    .main-div {
    
      left: 50%;
      top: 50%;
      text-transform: translate(-50%, -50%);
      position: absolute;
      border: 1px solid black;
      padding: 2px 6px 2px 6px;
      border-radius: 20%;
      font-weight: bold;
    
    
    }
    
    
    
    .clicked {
    
      color: red;
      letter-spacing: 2px;
    
    }
    
    .unclicked {
      color: blue;
    }
    

     

     

    Wheneven user click on button then event occur and css works.

     

     

    How to implement css when onClick event occur in Reactjs

     

     

     

     


    Disclaimer



    All tutorials are for informational and educational purposes only and have been made using our own routers, servers, websites and other vulnerable free resources. we do not contain any illegal activity. We believe that ethical hacking, information security and cyber security should be familiar subjects to anyone using digital information and computers. Hacking Truth is against misuse of the information and we strongly suggest against it. Please regard the word hacking as ethical hacking or penetration testing every time this word is used. We do not promote, encourage, support or excite any illegal activity or hacking.

     

     

     

     

  • CSS border

    Kumar Atul Jaiswal
    CSS Border


    CSS   BORDER 



     I have a red border on Bottom side.

                               
    _________________________    

                                I have a red border on Top side.






    I have borders on all sides.







    |  I have a blue left border.




    Example



    <!DOCTYPE html>
    <html>
    <head>

    <title> Border Style </title>


    <style>

    p.dotted { border-style: dotted; }
    p.dashed { border-style: dashed; }
    p.solid { border-style: solid; }
    p.double { border-style: double; }
    p.groove { border-style: groove; }
    p.ridge { border-style: ridge; }
    p.inset { border-style: inset; }
    p.outset { border-style: outset; }
    p.none { border-style: none; }
    p.hidden { border-style: hidden; }
    p.mix { border-style: dotted dashed solid double; }



    </style>
    </head>


    <body>


    <h2>The border-style Property</h2>
    <p>This property specifies what kind of border to display</p>

    <p class="dotted">A dotted border.</p>
    <p class="dashed">A dashed border.</p>
    <p class="solid">A solid border.</p>
    <p class="double">A double border.</p>
    <p class="groove">A groove border.</p>
    <p class="ridge">A ridge border.</p>
    <p class="inset">An inset border.</p>
    <p class="outset">An outset border.</p>
    <p class="none">No border.</p>
    <p class="hidden">A hidden border.</p>
    <p class="mix">A mixed border.</p>


    </body>
    </html>




    Result




    Kumar Atul Jaiswal



    Border-width 

    The border width property specifies the width of the four borders.
    The width can be set as a specific size ( in px, pt, em, cm etc ) or by using on of the three pre-defined values : thin, medium or thick. 
    The border-width  property can have from one to four values ( for the top border, right border, bottom border and the left border. ). 




    Kumar Atul Jaiswal




    Example



    <!DOCTYPE html>
    <html>
    <head>

    <style>
    p.one {
      border-style: solid;
      border-width: 5px;
    }

    p.two {
      border-style: solid;
      border-width: medium;
    }

    p.three {
      border-style: dotted;
      border-width: 2px;
    }

    p.four {
      border-style: dotted;
      border-width: thick;
    }

    p.five {
      border-style: double;
      border-width: 15px;
    }

    p.six {
      border-style: double;
      border-width: thick;
    }

    p.seven {
      border-style: solid;
      border-width: 2px 10px 4px 20px;

    }

    </style>
    </head>


    <body>


    <h2>The border-style Property</h2>
    <p>his property specifies the width of the four borders:</p>

    <p class="one">some text.</p>
    <p class="two">some text.</p>
    <p class="three">some text.</p>
    <p class="four">some text.</p>
    <p class="five">some text.</p>
    <p class="six">some text.</p>
    <p class="seven">some text.</p>


    </body>
    </html>




    Result





    Border Color 

    The border color property is used to set  the color of the four borders colors.
    • The Boder can be set by :-



    • Name  :-  Specifies the color name ,like  "Red".
    • Hex :-     Specifies the hex value,like #f00;
    • RGB :-  Specifes the RGB value, like "rgb(255, 0, 0)"
    • Transparent




    The border-color property can have from one to four values (for the top border, right border, bottom border, and the left border).

    If border-color is not set, it inherits the color of the element.

    Example 
    <!DOCTYPE html>
    <html>
    <head>

    <style>
    p.one {
      border-style: solid;
      border-color: red;
    }

    p.two {
      border-style: solid;
      border-color: green;
    }

    p.three {
      border-style: solid;
      border-color; red green blue yellow;
    }


    </style>
    </head>


    <body>


    <h2>The border-style Property</h2>
    <p>This property specifies the color of the four borders:</p>

    <p class="one">Kumar Atul Jaiswal. A solid red border</p>
    <p class="two">Kumar Atul JaiswalA solid red border</p>
    <p class="three">Kumar Atul Jaiswal. A solid multicolor border</p>

    <p><b>Note:</b> The "border-color" property does not work if it is used alone. Use the "border-style" property to set the borders first</p>

    </body>
    </html>




    Result





    Border Short-Hand Property

    The border property is a shorthand property for the following individual border properties:


    • border-width
    • border-style (required)
    • border-color



    Left Border


    Example 
    <!DOCTYPE html>
    <html>
    <head>

    <style>
    p.one {
      border-left:  6px solid red;
      background-color : lightgrey;
    }

    </style>
    </head>


    <body>


    <h2>The border left Property</h2>
    <p>his property is a shorthand property for border-left-width, border-left-style, and border-left-color.: Kumar Atul Jaiswal.</p>


    </body>
    </html>




    Result


    Bottom Border


    Example 
    <!DOCTYPE html>
    <html>
    <head>

    <style>
    p.one {
      border-bottom:  6px solid red;
      background-color : lightgrey;
    }

    </style>
    </head>


    <body>


    <h2>The border bottom Property</h2>
    <p>his property is a shorthand property for border-bottom-width, border-bottom-style, and border-bottom-color.: Kumar Atul Jaiswal.</p>


    </body>
    </html>




    Result





    Rounded Border

    The border-radius property is used to add rounded borders to an element:



    Example 
    <!DOCTYPE html>
    <html>
    <head>

    <style>
    p.normal1 {
      border: 2px solid  red;
    }

    p.round1 {
      border: 2px solid  red;
      border-radius : 5px;
    }

    p.round2 {
       border: 2px solid  red;
      border-radius : 8px;
    }

    p.round3 {
      border: 2px solid  red;
      border-radius : 12px;
    }


    </style>
    </head>


    <body>

    <h2>The border-radius Property</h2>
    <p>This property is used to add rounded borders to an element:</p>

    <p class="normal1">Kumar Atul Jaiswal. Normal Border</p>
    <p class="round1">Kumar Atul Jaiswal. Round Border</p>
    <p class="round2">Kumar Atul Jaiswal. Rounder border</p>
    <p class="round3">Kumar Atul Jaiswal. Roundest border</p>


    <p><b>Note:</b>  The "border-radius" property is not supported in IE8 and earlier versions</p>

    </body>
    </html>




    Result





    Video Tutorial :- SooN


    Have a Nice Stay Here  : - )
























































  • CSS background-Image

    Kumar Atul Jaiswal





    Css Background-Image

    The background-image property specifies an image to use as the background of an element.
    By default, the image is repeated so it covers the entire element.


    The background image for a page can be set like this :


    Example


    <!DOCTYPE html>
    <html>
    <head>

    <title>Css Background-Image</title>

    <style>
    body  {

    background-image : url (" http://bit.ly/2I0mKOM");
    }

    </style>



    </head>

    <body>

    <h1>This is heading.</h1>
    <p>This page has an image as the background.</p>

    </body>
    </html>





    Result


    kumar Atul Jaiswal










    Background-Image - Repeat Horizontally or Vertically

    By Default - The background-Image Property repeats an image both horizontally or vertically.
    some images should be repeated and horizontally or vertically, or they will look strange





    Example



    !DOCTYPE html>
    <html>
    <head>

    <title>Background-Image - Repeat Horizontally or Vertically</title>

    <style>
    body  {

    background-image : url (" http://bit.ly/2U0QFIb");
    }

    </style>



    </head>

    <body>

    <
    h1>Hello World!</h1>
    <p>Strange background image...</p>

    </body>
    </html>





    Result




    Kumar Atul Jaiswal



    • If the image above is repeated only horizontally (background-repeat: repeat-x;), the background will look better:





    Example




    !DOCTYPE html>
    <html>
    <head>

    <style>
    body  {

    background-image : url (" http://bit.ly/2U0QFIb");
    background-repeat : repeat-x;
    }

    </style>
    <title></title>


    </head>

    <body>
    <h1>Hello World!</h1>
    <p>Here, a background image is repeated only horizontally!</p>

    </body>
    </html>





    Result


    Kumar Atul Jaiswal











    Background-Image : Set Position and no-repeat

    showing the background-image only once is also specified by the background-repeat property.




    Example




    !DOCTYPE html>
    <html>
    <head>

    <title>Background-Image : Set Position and no-repeat</title>

    <style>
    body  {

    background-image : url ("http://bit.ly/2I0mKOM");
    background-repeat : no-repeat;
    background-size : cover;
    }

    </style>



    </head>

    <body>
    <h1>Hello World!</h1>
    <p>kumarAtuljaiswal background image example.</p>
    <p>The background image is only showing once, but it is disturbing the reader!</p>

    </body>
    </html>





    Result



    kumar Atul jaiswal







    • In the example above, the background image is shown in the same place as the text. 
    • We want to change the position of the image, so that it does not disturb the text too much.
    • The position of the image is specified by the background-position property:




    Example


    !DOCTYPE html>
    <html>
    <head>

    <style>
    body  {

    background-image : url ("http://bit.ly/2I957wz");
    background-repeat : no-repeat;
    background-position : right top;
    margin-right : 200px;

    }

    </style>
    <title></title>


    </head>

    <body>

    <
    h1>Hello World!</h1>
    <p>kumarAtuljaiswal background no-repeat, set position example.</p>
    <p>Now the background image is only shown once, and positioned away from the text.</p>
    <p>In this example we have also added a margin on the right side, so the background image will never disturb the text.</p>

    </body>
    </html>





    Result





    kumar Atul jaiswal










    Background-Image - Fixed position




    Example


    !DOCTYPE html>
    <html>
    <head>

    <title>Background-Image - Fixed position</title>

    <style>
    body  {

    background-image : url ("http://bit.ly/2VqBSrP");
    background-repeat : no-repeat;
    background-position : right top;
    background-attachment : fixed;
    margin-right : 200px;
    }

    </style>



    </head>

    <body>

    <
    h1>Hello World!</h1>
    <p>kumarAtuljaiswal background no-repeat, set position example.</p>
    <p>Now the background image is only shown once, and positioned away from the text.</p>
    <p>In this example we have also added a margin on the right side, so the background image will never disturb the text.</p>

    </body>
    </html>






    Result






    Kumar Atul Jaiswal





    Have a Nice Stay Here     :- )



























  • CSS Background color





    The CSS background properties are used to define the backgrounds affects for element.


    • Background-Color 







    The background-color property specifies the background color of an element.
    The background-color property of a page set like this :-  



    Example


    <!DOCTYPE html>
    <html>
    <head>

    <title> CSS Background bg-color </title>

    <style>

    body 

    {

       background-color: lightblue;
    }

    </style> 
    </head>

    <body>

    <h1>Hello This is kumar Atul jaiswal.</h1>
    <p>This is a paragraph.</p>

    </body>
    </html>





    Result









    With CSS, a color is most often specified by:
    a valid color name - like "red"
    a HEX value - like "#ff0000"
    an RGB value - like "rgb(255,0,0)"
    Look at CSS Color Values for a complete list of possible color values.

    In the example below, the <h1>, <p>, and <div> elements have different background colors:


    Example



    <!DOCTYPE html>
    <html>
    <head>

    <title> CSS Background bg-color </title>

    <style>

    h1 {
      background-color: green;
    }

    div {
      background-color: lightblue;
    }

    p {
      background-color: yellow;
    }

    </style></head>

    <body>


    <h1>CSS background-color example!</h1>

    <div>
    This is a text inside a div element.

    <p>This paragraph has its own background color.</p>

    We are still in the div element.
    </div>

    </body>
    </html>






    Result








    Have a Nice Stay Here   :- )






  • css colors





    CSS Colors

    Colors are specified using predefined color names, or RGB, HEX, HSL, RGBA, HSLA values.



    CSS Colors Names






    HTML support 140 colors names :- 



    CSS 1–2.0, HTML 3.2–4, and VGA color names
    NameHex
    (RGB)
    Red
    (RGB)
    Green
    (RGB)
    Blue
    (RGB)
    Hue
    (HSL/HSV)
    Satur.
    (HSL)
    Light
    (HSL)
    Satur.
    (HSV)
    Value
    (HSV)
    CGA number (name); alias
    White#FFFFFF100%100%100%0%100%0%100%15 (white)
    Silver#C0C0C075%75%75%0%75%0%75%07 (light gray)
    Gray#80808050%50%50%0%50%0%50%08 (dark gray)
    Black#0000000%0%0%0%0%0%0%00 (black)
    Red#FF0000100%0%0%100%50%100%100%12 (high red)
    Maroon#80000050%0%0%100%25%100%50%04 (low red)
    Yellow#FFFF00100%100%0%60°100%50%100%100%14 (yellow)
    Olive#80800050%50%0%60°100%25%100%50%06 (brown)
    Lime#00FF000%100%0%120°100%50%100%100%10 (high green); green
    Green#0080000%50%0%120°100%25%100%50%02 (low green)
    Aqua#00FFFF0%100%100%180°100%50%100%100%11 (high cyan); cyan
    Teal#0080800%50%50%180°100%25%100%50%03 (low cyan)
    Blue#0000FF0%0%100%240°100%50%100%100%09 (high blue)
    Navy#0000800%0%50%240°100%25%100%50%01 (low blue)
    Fuchsia#FF00FF100%0%100%300°100%50%100%100%13 (high magenta); magenta
    Purple#80008050%0%50%300°100%25%100%50%05 (low magenta)


    Background-Color 
    You can set the background-color for HTML elements.


    Example



    <!DOCTYPE html>
    <html>
    <head>
    <title>Css Colors </title>

    </head>

    <body>

    <h1 style="background-color: red">Web colors are colors used in displaying web pages on the World Wide Web, and the methods for describing and specifying those colors. Colors may be specified as an RGB triplet or in hexadecimal format (a hex triplet) or according to their common English names in some cases. A color tool or other graphics software is often used to generate color values. </h1>

    <p style="background-color:blue;"> In some uses, hexadecimal color codes are specified with notation using a leading number sign.A color is specified according to the intensity of its red, green and blue components, eachrepresented by eight bits. Thus, there are 24 bits used to specify a web color within the sRGB gamut, and 16,777,216 colors that may be so specified.   </p>

    </body>
    </html>




    Result




    Text color 


    You can set the color of text.

    You can set the color of text.


    Example 

    <!DOCTYPE html>
    <html>
    <head>
    <title>Css  Text color </title>

    </head>

    <body>

    <h1 style="colorgreen">Web colors are colors used in displaying web pages on the World Wide Web, and the methods for describing and specifying those colors. Colors may be specified as an RGB triplet or in hexadecimal format (a hex triplet) or according to their common English names in some cases. A color tool or other graphics software is often used to generate color values. </h1>

    <p style="color:blue;"> In some uses, hexadecimal color codes are specified with notation using a leading number sign.A color is specified according to the intensity of its red, green and blue components, eachrepresented by eight bits. Thus, there are 24 bits used to specify a web color within the sRGB gamut, and 16,777,216 colors that may be so specified.   </p>

    </body>
    </html>





    Result


    Web colors are colors used in displaying web pages on the World Wide Web, and the methods for describing and specifying those colors. Colors may be specified as an RGB triplet or in hexadecimal format (a hex triplet) or according to their common English names in some cases. A color tool or other graphics software is often used to generate color values.


    In some uses, hexadecimal color codes are specified with notation using a leading number sign.A color is specified according to the intensity of its red, green and blue components, eachrepresented by eight bits. Thus, there are 24 bits used to specify a web color within the sRGB gamut, and 16,777,216 colors that may be so specified.



    Border Color
    You can set the color of border.

    Hello world



    Example 

    <!DOCTYPE html>
    <html>
    <head>
    <title>Css  Text color </title>

    </head>

    <body>

    <h1 style="border: 1px solid  #f00;">Web colors are colors used in displaying web pages on the World Wide Web, and the methods for describing and specifying those colors.  </h1>

    <p style="border: 1px solid blue;"> In some uses, hexadecimal color codes are specified with notation using a leading number sign..  </p>

    </body>
    </html>





    Result

    Web colors are colors used in displaying web pages on the World Wide Web, and the methods for describing and specifying those colors. 

     In some uses, hexadecimal color codes are specified with notation using a leading number sign.. 




    Color Values 



    In HTML, colors can also be specified using RGB values, HEX values, HSL values, RGBA values, and HSLA values:

    • rgb(255, 99, 71)
    • #ff6347
    • hsl(9, 100%, 64%)




    Example 


    <h1 style="background-color:rgb(255, 99, 71);">...</h1>

    <h1 style="background-color:#ff6347;">...</h1>

    <h1 style="background-color:hsl(9, 100%, 64%);">...</h1>



    You also must read this article : 



    Click Here

    RGB Value 

    In HTML, a color can be specified as an RGB value, using this formula:

    rgb(red, green, blue)

    Each parameter (red, green, and blue) defines the intensity of the color between 0 and 255.

    For example, rgb(255, 0, 0) is displayed as red, because red is set to its highest value (255) and the others are set to 0.

    To display the color black, all color parameters must be set to 0, like this: rgb(0, 0, 0).

    To display the color white, all color parameters must be set to 255, like this: rgb(255, 255, 255).


    • rgb(255, 99, 71)
    • rgb(255, 0, 0)
    • rgb(60, 179, 113)
    • rgb(255, 165, 0)
    • rgb(106, 90, 205)







    HEX value


    In HTML, a color can be specified using a hexadecimal value in the form:

    #rrggbb

    Where rr (red), gg (green) and bb (blue) are hexadecimal values between 00 and ff (same as decimal 0-255).

    For example, #ff0000 is displayed as red, because red is set to its highest value (ff)
    and the others are set to the lowest value (00).


    • #ff0000
    • #ffa500
    • #ee82ee
    • #6a5acd
    • #787878
    • #ffffff                   



    RGBA 


    RGBA color values are an extension of RGB color values with an alpha channel - which specifies the 
    An RGBA color value is specified with:
    rgba(red, green, blue, alpha)
    The alpha parameter is a number between 0.0 (fully transparent) and 1.0 (not transparent at all):




    • rgba(255, 99, 71, 0)
    • rgba(255, 99, 71, 0.8)
    • rgba(255, 99, 71, 0.6)
    • rgba(255, 99, 71, 1)

































  • WHAT WE DO

    We've been developing corporate tailored services for clients for 30 years.

    CONTACT US

    For enquiries you can contact us in several different ways. Contact details are below.

    Hacking Truth.in

    • Street :Road Street 00
    • Person :Person
    • Phone :+045 123 755 755
    • Country :POLAND
    • Email :contact@heaven.com

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.