[JS]角丸を簡単な記述で実装するスクリプト -Roundcorners Canvas | コリスFirst Faved : Mar 10 2008 by mippeFaved : 11 times (1 with note)Viewed : 31 timesFave It!
Faves for this Web page
- mippe - Mar 10 2008 | css, Javascript, jQuery
Roundcorners Canvasは、タブ・ボタン・テーブルなどの矩形に、簡単な記述で角丸を実装できるスクリプトです。
Roundcorners Canvas
デモページ上記のキャプチャ画像のように、divの矩形(赤の箇所)と、リストのタブ(Lookの箇所)を角丸にするには、下記のコードを使用します。
view plaincopy to clipboardprint?$(document).ready(function() { $(”#mainblock”).corner(”30px”); $(”#menu ul li”).corner(”8px top”); }); $(document).ready(function() {
$(”#mainblock”).corner(”30px”);
$(”#menu ul li”).corner(”8px top”);
});
Roundcorners Canvasは、ほかにも多様な角丸を実装することができます。
デモページ 21pxの角丸のサンプル
border colorのサンプル
背景色のサンプル
背景画像のサンプル
ネストされたdivのサンプル
lineのサンプル
四辺で異なる角丸のサンプル
tableのサンプル
インライン要素のサンプル
エフェクトのサンプル
Roundcorners CanvasはjQueryのプラグインのため、実装にはjquery.jsが必要です。
- livesizu - Mar 11 2008 | DesignTIPS, web, CSS
- kyaayk - Mar 10 2008 | javascript, デザイン, design
- ads7sda - Mar 10 2008 | jQuery, js, javascript
Already a user? Sign In
Add a Fave for this Web page
- What happens when I press Publish?
- Your Fave for this Web page gets shared with the Faves community. You can access it at any time by selecting "My Faves" from the menu above.
- Why do you ask for my email address?
- We use your email address to create an account, so you can easily find your Fave again at a later time.
Related Content from Around Faves
css
-
1 FaverViewed: 13 TimesQuoted: * html body { float:left; display:inline; voice-family: "\"}\""; voice-family:inherit; }
- zzelinski - 3 days ago1 FaverViewed: 3 Times
- relia - Nov 26 20064 FaversViewed: 27 Times
