How to set box shadow on image using CSS


In this article, we will discuss about the box shadow, many time we think that how to give 3d look of our image. It is very easy we just need to put box-shadow: property in the css and that css need to call our image, just like below code.



Source code:-
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="shadowbox.aspx.cs" Inherits="shadowbox" %>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Shadow box on image </title>
    <style type="text/css">
        .img
        {


            box-shadow: 10px 10px 5px #888888;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <img src="codesolutions.png"  alt="Code solutions" class="img"/>
    </div>
    </form>
</body>
</html>


Out –put:-




How to set box shadow on image using CSS How to set box shadow on image using CSS Reviewed by NEERAJ SRIVASTAVA on 6:50:00 PM Rating: 5

No comments:

Powered by Blogger.