New on DHTMLGoodies.com:
DHTML Chess is now available for WordPress at WordPressChess.com.
Download Rounded corners script
Download script
You can download the entire script from this Zip file
Files included in the package:
- rounded-corners.html = Main demo HTML file
- js/rounded-corners.js = Main JS file for the script
- doc/* = Documentation of methods
Configuration
Include files
First, you need to include the js file rounded-corners.html with a script tag
Specify which elements you want to apply rounded corners to
This is done by the addTarget method. Example: Put this at the bottom of your HTML file:
<script type="text/javascript">
rC = new DHTMLgoodies_roundedCorners();
rC.addTarget('leftColumn',25,25,'#317082','#FFFFFF',5,300, 'top_left,bottom_left,bottom_right');
rC.addTarget('contentColumn',25,25,'#7190E0','#FFFFFF',5,300, 'top_left,bottom_left,bottom_right');
rC.addTarget('footer',25,25,'#CCCCFF','#FFFFFF',5,false, 'bottom_left,bottom_right');
rc.init();
</script>
This will add rounded corners to element with ids leftColumn, contentColumn and footer.
The arguments to the addTarget method are:
- ID of element
- X radius of rounded corner
- Y radius of rounded corner
- Background color of element you are applying rounded corners to
- Background color of element behind
- Padding of content.
- Height of content.
- Where to apply corners
For more help, look at the demo file or see the Complete class documentation
No one has commented this - be first!
Post your comment
Comment preview: