Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSS Shapes

CSS Shapes

mahdi pedramrazi

September 25, 2014
Tweet

More Decks by mahdi pedramrazi

Other Decks in Technology

Transcript

  1. Rectangular  Layout.   Web  Developers  are  forced  to   create

     web  content  for   rectangular  boxes.  
  2. Breaking  the  Constraints  of  the   Rectangle   CSS  Shapes

     allow  web  designers  to   wrap  content  around  custom  paths,   like  circles,  ellipses  and  polygons  
  3. CreaLng  Circles   circle(r  at  cx  cy)   r  =

     radius   cx  =  x-­‐axis  (op6onal)   cy  =  y-­‐axis  (op6onal)  
  4. Shape  CoordinaLng  System   The  origin  of  the  coordinate  system

     is  at  its  upper-­‐leO  corner     with  the  X-­‐axis  poinLng  to  the  right  and  the  Y-­‐axis  poinLng  down.  
  5. CreaLng  Ellipse   ellipse(rx  ry  at  cx  cy)   cx

     =  x-­‐axis  (op6onal)   cy  =  y-­‐axis  (op6onal)  
  6. Browser  Support     •  WebKit  and  Blink.    

    •  Chrome  37   •  Opera  24.     •  It  will  be  available  in  Safari  8  (and  the  7.1  and   6.2  updates)  
  7. Enable  CSS  Shapes   -­‐  Copy  and  paste    

    chrome://flags/#enable-­‐experimental-­‐web-­‐plaaorm-­‐features   into  the  address  bar     -­‐  Press  enter.  Click  the  ‘Enable’  link  within  that  secLon     -­‐  Click  the  ‘Relaunch  Now’  budon  at  the  bodom  of  the   browser  window.   -­‐  Install  CSS  Shape  Editor:     hdps://chrome.google.com/webstore/detail/css-­‐shapes-­‐ editor/nenndldnbcncjmeacmnondmkkfedmgmp  
  8. Demo     Alice  in  wonderland   Espresso    

      W3c  DocumentaLon   DocumentaLon