w3schools    w3Schools
Search :
   
HOME HTML CSS XML JAVASCRIPT ASP PHP SQL MORE...   References Examples Forum About
ADVERTISEMENTS

XML Certification
Download XML editor
Custom Programming
 
Table of contents
SVG Basic
SVG HOME
SVG Intro
SVG Example
SVG in HTML

SVG Shapes
SVG Rectangle
SVG Circle
SVG Ellipse
SVG Line
SVG Polygon
SVG Polyline
SVG Path

SVG Filters
SVG Intro
SVG Gaussian

SVG Gradients
SVG Linear
SVG Radial

SVG Examples
SVG Examples

SVG Reference
SVG Elements

Selected Reading
Web Statistics
Web Glossary
Web Hosting
Web Quality

Browse Tutorials
 

SVG feOffset Element


SVG Reference Complete SVG Reference

Definition and Usage

The SVG feOffset element is used to move an image relative to its current position. With this element it is possible to create drop shadow effects.

The dx attribute specifies the amount to move the image along the x-axis.

The dy attribute specifies the amount to move the image along the y-axis.


Example 1

The following example shows a drawing of two objects - a sharp "original" on the top of a "shadow" object.

Copy the following code into Notepad and save the file as "feoffset_1.svg". Place the file in your Web directory:

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" version="1.1"
xmlns="http://www.w3.org/2000/svg">
<defs>
<filter id="filter" x="0" y="0">
  <feGaussianBlur stdDeviation="5"/>
  <feOffset dx="5" dy="5"/>
</filter>
</defs>
<rect width="90" height="90"
fill="grey" filter="url(#filter)"/>
<rect width="90" height="90"
fill="yellow" stroke="black"/>
</svg>

View example


SVG Reference Complete SVG Reference



 
WEB HOSTING
Web charting
Cheap VPS Hosting
$10 Domain Name
Registration
Cheap Domain Names
Cheap Web Hosting
Amins Point
PHP MySQL Hosting
Top 10 Web Hosting
UK Reseller Hosting
Live Cricket Score
FREE Web Hosting
WEB BUILDING
Online Travel
Web development
EDUCATION
US Web Design Schools
HTML Certification
JavaScript Certification
XML Certification
PHP Certification
ASP Certification
Home HOME or Top of Page Validate   Validate   W3C-WAI level A conformance icon Printer Friendly  Printer Friendly

W3Schools is for training only. We do not warrant the correctness of its content. The risk from using it lies entirely with the user.
While using this site, you agree to have read and accepted our terms of use and privacy policy.
Copyright 1999-2009 by Refsnes Data. All Rights Reserved.