Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to draw this shape with css ?

Featured Replies

I'm having the problem with putting this shape into my website. I design this black shape as a frame to put image in but when it comes to coding, i don't know how to draw the shape in css. (Because I can't slice this shape in photoshop :( ) Can someone teach me or show me the css code to draw this ?

Thanks :)

post-34502-0-62899400-1319703634_thumb.jpg

Edited by killyblame

.Box {

-webkit-border-radius: 20px; /* Saf3-4, iOS 1-3.2, Android <1.6 */

-moz-border-radius: 20px; /* FF1-3.6 */

border-radius: 20px; /* Opera 10.5, IE9, Saf5, Chrome, FF4, iOS 4, Android 2.1+ */

background-image: url(Images/Background_Black_01.png);

height: 163px;

width: 300px;

}

 

This will make the shape you require but I don't know what image/info you want to put in it or it's size, I've attached the image and a screen shot of how I make it in Adobe Illustrator.

Open Ai and make a new Doc Use the rounded-Rectangle-Tool to draw the box 0 stroke, fill black, Switch to the pen tool and add 4 anchor points 2 on the top 2 on the bottom where the cut out bit is use the Direct selection tool to move the anchors to get the required shape. Save for Web& Device as a .png and tick transparency, resize the css about to the requires size.

 

Hope this helps

Nick

post-22612-0-04378800-1319740196_thumb.png

post-22612-0-82637000-1319740389_thumb.png

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.