SlideShare a Scribd company logo
<!DOCTYPE html>background
<html>
<body>
<h1>Hello World!</h1>
<button onclick="myFunction()">Setbackground</button>
<script>
functionmyFunction() {
document.body.style.background="#f3f3f3 url('img_tree.png') no-repeatrighttop";
}
</script>
</body>
</html>
<!DOCTYPE html>backgroundAttachment
<html>
<head>
<style>
body {
background: #f3f3f3 url('img_tree.png') no-repeatrighttop;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
<p><b>Tip:</b> Try to to resize the window ifthe scrollbar is not available.</p>
<p><b>Tip:</b> Scroll the page before and after you have clickedthe button.</p>
<button onclick="myFunction()">Setbackgroundimage to be fixed</button>
<br>
<script>
functionmyFunction() {
document.body.style.backgroundAttachment="fixed";
}
</script>
<p>Some text to enable scrolling..
<br><br><br><br>
<br><br><br><br>
</p>
</body>
</html>
<!DOCTYPE html>backgroundColor
<html>
<body>
<h1>Hello World!</h1>
<button type="button" onclick="myFunction()">Setbackground color</button>
<script>
functionmyFunction() {
document.body.style.backgroundColor="red";
}
</script>
</body>
</html>
<!DOCTYPE html>backgroundImage
<html>
<body>
<h1>Hello World!</h1>
<button type="button" onclick="myFunction()">Setbackgroundimage</button>
<script>
functionmyFunction() {
document.body.style.backgroundColor="#f3f3f3";
document.body.style.backgroundImage ="url('img_tree.png')";
}
</script>
</body>
</html>
<!DOCTYPE html>backgroundPosition
<html>
<head>
<style>
body {
background-image:url('img_tree.png');
background-repeat:no-repeat;
}
</style>
</head>
<body>
<button type="button" onclick="myFunction()">Positionbackgroundimage</button>
<script>
functionmyFunction() {
document.body.style.backgroundPosition="topright";
}
</script>
</body>
</html>
<!DOCTYPE html>backgroundRepeat
<html>
<head>
<style>
body {
background: #f3f3f3 url('img_tree.png');
}
</style>
</head>
<body>
<h1>Hello World!</h1>
<button type="button" onclick="myFunction()">Setbackground image to no-repeat</button>
<script>
functionmyFunction() {
document.body.style.backgroundRepeat= "no-repeat";
}
</script>
</body>
</html>
<!DOCTYPE html>backgroundClip
<html>
<head>
<style>
#myDIV {
width: 300px;
height:300px;
padding: 50px;
background-color: coral;
background-clip:border-box;
color: white;
border: 5px dotted lightgrey;
}
</style>
</head>
<body>
<p>Click the "Try it" button to setthe background-clipproperty of the DIV elementto "content-
box":</p>
<button onclick="myFunction()">Tryit</button>
<div id="myDIV">
Lorem ipsumdolor sit amet, consectetueradipiscingelit,seddiam nonummynibh euismodtincidunt
ut laoreetdolore magna aliquam erat volutpat. Ut wisi enimad minimveniam,quis nostrud exerci
</div>
<script>
functionmyFunction() {
document.getElementById("myDIV").style.backgroundClip="content-box";
}
</script>
</body>
</html>
<!DOCTYPE html>backgroundSize
<html>
<head>
<style>
#myDIV {
border: 1px solid black;
width: 300px;
height:300px;
background: url('smiley.gif') no-repeat;
}
</style>
</head>
<body>
<p>Click the "Try it" button to enlarge the background-size of the DIV element:</p>
<button onclick="myFunction()">Tryit</button>
<div id="myDIV">
<h1>Hello</h1>
</div>
<script>
functionmyFunction() {
document.getElementById("myDIV").style.backgroundSize ="60px120px";
}
</script>
</body>
</html>
<!DOCTYPE html>backfaceVisibility
<html>
<head>
<style>
div {
width: 100px;
height:100px;
background: red;
color: white;
-webkit-animation:mymove 2s infinite linearalternate;/* Chrome,Safari, Opera */
animation: mymove 2s infinite linearalternate;
}
/* Chrome,Safari, Opera */
@-webkit-keyframesmymove {
to {-webkit-transform:rotateY(180deg);}
}
@keyframesmymove {
to {transform: rotateY(180deg);}
}
</style>
</head>
<body>
<p>Check/uncheck the checkbox to change the backface-visibilityofthe animated DIV element:</p>
<div id="myDIV">
<h1>Hello</h1>
</div>
<input type="checkbox" onclick="myFunction(this)" checked>backface-visibility
<script>
functionmyFunction(x) {
if(x.checked=== true) {
document.getElementById("myDIV").style.WebkitBackfaceVisibility="visible";//Code for Chrome,
Safari, Opera
document.getElementById("myDIV").style.backfaceVisibility="visible";
} else {
document.getElementById("myDIV").style.WebkitBackfaceVisibility="hidden";// Code for
Chrome,Safari, Opera
document.getElementById("myDIV").style.backfaceVisibility="hidden";
}
}
</script>
<p><strong>Note:</strong> The backface-visibilityandbackfaceVisibilitypropertiesare notsupported
in InternetExplorer9 and earlierversions.</p>
</body>
</html>
<!DOCTYPE html>border
<html>
<body>
<div id="myDiv">Thisisa div element.</div>
<br>
<button type="button" onclick="myFunction()">Setborder</button>
<script>
functionmyFunction() {
document.getElementById("myDiv").style.border="thicksolid #0000FF";
}
</script>
</body>
</html>
document.getElementById("myDiv").style.borderBottom="thicksolid#0000FF";
document.getElementById("myDiv").style.borderBottomColor="red";
<!DOCTYPE html>borderBottomLeftRadius
<html>
<head>
<style>
#myDIV {
border: 1px solid black;
width: 300px;
height:300px;
}
</style>
</head>
<body>
<p>Click the "Try it" button to change the border-bottom-left-radiuspropertyofthe DIV
element:</p>
<button onclick="myFunction()">Tryit</button>
<div id="myDIV">
<h1>Hello</h1>
</div>
<script>
functionmyFunction() {
document.getElementById("myDIV").style.borderBottomLeftRadius="25px";
document.getElementById("myDIV").style.borderBottomLeftRadius="25px";
}
</script>
</body>
</html>
<!DOCTYPE html>borderBottomStyle
<html>
<body>
<div id="myDiv">Thisisa div.</div>
<br>
<button type="button" onclick="myFunction()">Setsolidbottomborder</button>
<script>
functionmyFunction() {
document.getElementById("myDiv").style.borderBottomStyle="solid";
}
</script>
</body>
</html>
<!DOCTYPE html>borderBottomWidth
<html>
<head>
<style>
#myDiv {
border-style:solid;
}
</style>
</head>
<body>
<div id="myDiv">Thisisa div element.</div>
<br>
<button type="button" onclick="myFunction()">Change widthofthe bottom border</button>
<script>
functionmyFunction() {
document.getElementById("myDiv").style.borderBottomWidth="10px";
}
</script>
</body>
</html>
<!DOCTYPE html>borderCollapse
<html>
<body>
<table id="myTable" border="1">
<tr>
<th>Month</th>
<th>Savings</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$150</td>
</tr>
</table>
<br>
<button type="button" onclick="myFunction()">Collapseborder</button>
<script>
functionmyFunction() {
document.getElementById("myTable").style.borderCollapse ="collapse";
}
</script>
</body>
</html>
<!DOCTYPE html>borderColor
<html>
<head>
<style>
#myDiv {
border: thick solidblue;
}
</style>
</head>
<body>
<div id="myDiv">Thisisa div.</div>
<br>
<button type="button" onclick="myFunction()">Change colorofthe four borders</button>
<script>
functionmyFunction() {
document.getElementById("myDiv").style.borderColor="red";
}
</script>
</body>
</html>
<!DOCTYPE html>borderColor
<html>
<head>
<style>
#myDIV {
border: 15px solidtransparent;
width: 250px;
padding: 10px 20px;
-webkit-border-image:url(border.png) 3030 stretch; /* Safari 5 */
-o-border-image:url(border.png) 3030 stretch; /* Opera 12 */
border-image:url(border.png) 30 30 stretch;
}
</style>
</head>
<body>
<p>Click the "Try it" button to change the border-image propertyof the DIV element:</p>
<button onclick="myFunction()">Tryit</button>
<div id="myDIV">
<h1>Hello</h1>
</div>
<script>
functionmyFunction() {
document.getElementById("myDIV").style.WebkitBorderImage ="url(border.png) 30 30 round"; /*
Code for Safari 5 */
document.getElementById("myDIV").style.OBorderImage ="url(border.png) 30 30 round"; /* Code
for Opera 12 */
document.getElementById("myDIV").style.borderImage ="url(border.png) 3030 round";
}
</script>
</body>
</html>
<!DOCTYPE html>boxShadow
<html>
<head>
<style>
#myDIV {
position:absolute;
width: 100px;
height:100px;
background-color: coral;
color: white;
}
</style>
</head>
<body>
<p>Click the "Try it" button to setthe boxShadow property of the DIV element:</p>
<button onclick="myFunction()">Tryit</button>
<div id="myDIV">
<h1>myDIV</h1>
</div>
<script>
functionmyFunction() {
document.getElementById("myDIV").style.boxShadow="10px 20px 30px lightblue";
}
</script>
</body>
</html>
<!DOCTYPE html>display
<html>
<head>
<style>
#myDIV {
width: 500px;
height:500px;
background-color: lightblue;
}
</style>
</head>
<body>
<p>Click the "Try it" button to setthe displayproperty of the DIV elementto"none":</p>
<button onclick="myFunction()">Tryit</button>
<div id="myDIV">
This is my DIV element.
</div>
<p><b>Note:</b> The elementwill nottake up any space whenthe displayproperty set to
"none".</p>
<script>
functionmyFunction() {
document.getElementById("myDIV").style.display="none";
}
</script>
</body>
</html>
<!DOCTYPE html>Style cursor Property
<html>
<body>
<p id="myP">Mouse overthis textbefore and after you have clickedthe button below!</p>
<button type="button" onclick="myFunction()">Change cursor</button>
<script>
functionmyFunction() {
document.getElementById("myP").style.cursor= "pointer";
}
</script>
</body>
</html>
<!DOCTYPE html>font
<html>
<body>
<p id="myP">Thisis a paragraph.</p>
<button type="button" onclick="myFunction()">Setfont</button>
<script>
functionmyFunction() {
document.getElementById("myP").style.font="italicbold 20px arial,serif";
}
</script>
</body>
</html>
document.getElementById("myP").style.fontFamily="Impact,Charcoal,sans-serif";
document.getElementById("myP").style.fontFamily="Impact,Charcoal,sans-serif";
document.getElementById("myP").style.fontSize ="xx-large";
document.getElementById("myP").style.fontStyle="italic";
document.getElementById("myP").style.fontVariant="small-caps";
document.getElementById("myBtn").style.height="50px";
document.getElementById("main".style.justifyContent="space-between";
document.getElementById("myBtn").style.left="100px";
document.getElementById("myP").style.letterSpacing="15px";
document.getElementById("myDiv").style.lineHeight="3";
document.getElementById("myList").style.listStyle ="decimal inside";
document.getElementById("myList").style.listStyleImage="url('sqorange.gif')";
document.getElementById("myDiv").style.margin="50px 10px 20px 30px";
document.getElementById("myDiv").style.marginBottom="50px";
<!DOCTYPE html>overflow
<html>
<head>
<style>
#myDIV {
border: 1px solid black;
background-color: lightblue;
width: 300px;
height:210px;
overflow:visible;
}
</style>
</head>
<body>
<p>Click the "Try it" button to change the overflowproperty ofthe DIV element:</p>
<button onclick="myFunction()">Tryit</button>
<div id="myDIV">
Lorem ipsumdolor sit amet, consectetueradipiscingelit,seddiam nonummynibh euismodtincidunt
ut laoreetdolore magna aliquam erat volutpat. Ut wisi enimad minimveniam,quis nostrud exerci
type extra
</div>
<script>
functionmyFunction() {
document.getElementById("myDIV").style.overflow="scroll";
}
</script>
</body>
</html>
document.getElementById("myDIV").style.overflowX="scroll";
document.getElementById("myDIV").style.overflowX="scroll";
document.getElementById("myDiv").style.padding="50px 10px 20px 30px";
<!DOCTYPE html> Transform
<html>
<head>
<style>
#myDIV {
margin: auto;
border: 1px solid black;
width: 200px;
height:100px;
background-color: coral;
color: white;
}
</style>
</head>
<body>
<p>Click the "Try it" button to rotate the DIV element:</p>
<button onclick="myFunction()">Tryit</button>
<div id="myDIV">
<h1>myDIV</h1>
</div>
<script>
functionmyFunction() {
// Code for Chrome, Safari, Opera
document.getElementById("myDIV").style.WebkitTransform="rotate(20deg)";
// Code for IE9
document.getElementById("myDIV").style.msTransform="rotate(20deg)";
// Standard syntax
document.getElementById("myDIV").style.transform="rotate(20deg)";
}
</script>
</body>
</html>
<!DOCTYPE html>transitionTimingFunction
<html>
<head>
<style>
#myDIV {
border: 1px solid black;
background-color: lightblue;
width: 270px;
height:200px;
overflow:auto;
-webkit-transition:all 2s; /* For Safari 3.1 to 6.0 */
transition: all 2s;
}
#myDIV:hover {
background-color: coral;
width: 570px;
height:500px;
padding: 100px;
border-radius:50px;
}
</style>
</head>
<body>
<p>Mouse overthe DIV elementand it will change,gradually, both in color and size!</p>
<p>Click the "Try it" button and mouse over the DIV elementagain. The changes will now happen ina
linearspeedcurve.</p>
<button onclick="myFunction()">Tryit</button>
<div id="myDIV">
<h1>myDIV</h1>
</div>
<script>
functionmyFunction() {
document.getElementById("myDIV").style.WebkitTransitionTimingFunction="linear";// Code for
Safari 3.1 to 6.0
document.getElementById("myDIV").style.transitionTimingFunction ="linear"; // Standard
syntax
}
</script>
<p><strong>Note:</strong> The transitionTimingFunctionpropertyis supportedin InternetExplorer
10, Firefox,Opera,and Chrome.</p>
<p>Safari supports an alternative,the WebkitTransitionTimingFunctionproperty.</p>
</body>
</html>

More Related Content

What's hot

jQuery UI and Plugins
jQuery UI and PluginsjQuery UI and Plugins
jQuery UI and Plugins
Marc Grabanski
 
The project gutenberg e book, fairy tales from brazil, by elsie spicer
The project gutenberg e book, fairy tales from brazil, by elsie spicerThe project gutenberg e book, fairy tales from brazil, by elsie spicer
The project gutenberg e book, fairy tales from brazil, by elsie spicer
Andrei Hortúa
 
2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security
Johannes Hoppe
 
Laravel 로 배우는 서버사이드 #5
Laravel 로 배우는 서버사이드 #5Laravel 로 배우는 서버사이드 #5
Laravel 로 배우는 서버사이드 #5
성일 한
 
jQtouch, Building Awesome Webapps
jQtouch, Building Awesome WebappsjQtouch, Building Awesome Webapps
jQtouch, Building Awesome Webapps
Home
 
Html5 101
Html5 101Html5 101
Html5 101
Mouafa Ahmed
 
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Phil Leggetter
 
ChocolateChip-UI
ChocolateChip-UIChocolateChip-UI
ChocolateChip-UI
GeorgeIshak
 
Implement rich snippets in your webshop
Implement rich snippets in your webshopImplement rich snippets in your webshop
Implement rich snippets in your webshop
Arjen Miedema
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
Remy Sharp
 
Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015
Phil Leggetter
 
Html5 101
Html5 101Html5 101
Html5 101
Mouafa Ahmed
 
ActiveResource & REST
ActiveResource & RESTActiveResource & REST
ActiveResource & REST
Robbert
 
jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009
Ralph Whitbeck
 
The Thinking behind BEM
The Thinking behind BEMThe Thinking behind BEM
The Thinking behind BEM
Varya Stepanova
 
Odoo - Create themes for website
Odoo - Create themes for websiteOdoo - Create themes for website
Odoo - Create themes for website
Odoo
 
Unlock the next era of UI design with Polymer
Unlock the next era of UI design with PolymerUnlock the next era of UI design with Polymer
Unlock the next era of UI design with Polymer
Rob Dodson
 
Web Components Revolution
Web Components RevolutionWeb Components Revolution
Web Components Revolution
Web Standards School
 
Web UI performance tuning
Web UI performance tuningWeb UI performance tuning
Web UI performance tuning
Andy Pemberton
 
FrontInBahia 2014: 10 dicas de desempenho para apps mobile híbridas
FrontInBahia 2014: 10 dicas de desempenho para apps mobile híbridasFrontInBahia 2014: 10 dicas de desempenho para apps mobile híbridas
FrontInBahia 2014: 10 dicas de desempenho para apps mobile híbridas
Loiane Groner
 

What's hot (20)

jQuery UI and Plugins
jQuery UI and PluginsjQuery UI and Plugins
jQuery UI and Plugins
 
The project gutenberg e book, fairy tales from brazil, by elsie spicer
The project gutenberg e book, fairy tales from brazil, by elsie spicerThe project gutenberg e book, fairy tales from brazil, by elsie spicer
The project gutenberg e book, fairy tales from brazil, by elsie spicer
 
2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security2013-06-25 - HTML5 & JavaScript Security
2013-06-25 - HTML5 & JavaScript Security
 
Laravel 로 배우는 서버사이드 #5
Laravel 로 배우는 서버사이드 #5Laravel 로 배우는 서버사이드 #5
Laravel 로 배우는 서버사이드 #5
 
jQtouch, Building Awesome Webapps
jQtouch, Building Awesome WebappsjQtouch, Building Awesome Webapps
jQtouch, Building Awesome Webapps
 
Html5 101
Html5 101Html5 101
Html5 101
 
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
Why You Should be Using Web Components Right Now. And How. ForwardJS July 2015
 
ChocolateChip-UI
ChocolateChip-UIChocolateChip-UI
ChocolateChip-UI
 
Implement rich snippets in your webshop
Implement rich snippets in your webshopImplement rich snippets in your webshop
Implement rich snippets in your webshop
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
 
Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015Why you should be using Web Components. And How - DevWeek 2015
Why you should be using Web Components. And How - DevWeek 2015
 
Html5 101
Html5 101Html5 101
Html5 101
 
ActiveResource & REST
ActiveResource & RESTActiveResource & REST
ActiveResource & REST
 
jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009jQuery For Beginners - jQuery Conference 2009
jQuery For Beginners - jQuery Conference 2009
 
The Thinking behind BEM
The Thinking behind BEMThe Thinking behind BEM
The Thinking behind BEM
 
Odoo - Create themes for website
Odoo - Create themes for websiteOdoo - Create themes for website
Odoo - Create themes for website
 
Unlock the next era of UI design with Polymer
Unlock the next era of UI design with PolymerUnlock the next era of UI design with Polymer
Unlock the next era of UI design with Polymer
 
Web Components Revolution
Web Components RevolutionWeb Components Revolution
Web Components Revolution
 
Web UI performance tuning
Web UI performance tuningWeb UI performance tuning
Web UI performance tuning
 
FrontInBahia 2014: 10 dicas de desempenho para apps mobile híbridas
FrontInBahia 2014: 10 dicas de desempenho para apps mobile híbridasFrontInBahia 2014: 10 dicas de desempenho para apps mobile híbridas
FrontInBahia 2014: 10 dicas de desempenho para apps mobile híbridas
 

Viewers also liked

7 Ways to Embrace in Occupational Therapy Month
7 Ways to Embrace in Occupational Therapy Month7 Ways to Embrace in Occupational Therapy Month
7 Ways to Embrace in Occupational Therapy Month
Shock Aid
 
Daily Assistance Devices
Daily Assistance DevicesDaily Assistance Devices
Daily Assistance Devices
Shock Aid
 
Simon CV June 2015
Simon CV June 2015Simon CV June 2015
Simon CV June 2015
Simon Carroll
 
Sarah Roth CV August 2015
Sarah Roth CV August 2015Sarah Roth CV August 2015
Sarah Roth CV August 2015
Sarah Roth
 
Ibrahim_Anwar_CV
Ibrahim_Anwar_CVIbrahim_Anwar_CV
Ibrahim_Anwar_CV
Eng_ibrahim anwar
 
Matte areal 5.trinn
Matte areal 5.trinnMatte areal 5.trinn
Matte areal 5.trinn
DagThomas
 
Internet Of Things
Internet Of ThingsInternet Of Things
Internet Of Things
defisafitri
 
Vaccine ppt
Vaccine pptVaccine ppt
Vaccine ppt
idjf
 
Skin icare
Skin icareSkin icare
Skin icare
wainkqinek
 
Politici naţionalr şi internaţionale în privinţa protejării mediului
Politici naţionalr şi internaţionale în privinţa protejării mediuluiPolitici naţionalr şi internaţionale în privinţa protejării mediului
Politici naţionalr şi internaţionale în privinţa protejării mediului
elenabadragan
 

Viewers also liked (11)

7 Ways to Embrace in Occupational Therapy Month
7 Ways to Embrace in Occupational Therapy Month7 Ways to Embrace in Occupational Therapy Month
7 Ways to Embrace in Occupational Therapy Month
 
Daily Assistance Devices
Daily Assistance DevicesDaily Assistance Devices
Daily Assistance Devices
 
Simon CV June 2015
Simon CV June 2015Simon CV June 2015
Simon CV June 2015
 
Sarah Roth CV August 2015
Sarah Roth CV August 2015Sarah Roth CV August 2015
Sarah Roth CV August 2015
 
Ibrahim_Anwar_CV
Ibrahim_Anwar_CVIbrahim_Anwar_CV
Ibrahim_Anwar_CV
 
Matte areal 5.trinn
Matte areal 5.trinnMatte areal 5.trinn
Matte areal 5.trinn
 
Ceremonia
CeremoniaCeremonia
Ceremonia
 
Internet Of Things
Internet Of ThingsInternet Of Things
Internet Of Things
 
Vaccine ppt
Vaccine pptVaccine ppt
Vaccine ppt
 
Skin icare
Skin icareSkin icare
Skin icare
 
Politici naţionalr şi internaţionale în privinţa protejării mediului
Politici naţionalr şi internaţionale în privinţa protejării mediuluiPolitici naţionalr şi internaţionale în privinţa protejării mediului
Politici naţionalr şi internaţionale în privinţa protejării mediului
 

Similar to Javascript

Imageslider
ImagesliderImageslider
Imageslider
Rajendra Kandel
 
Stole16
Stole16Stole16
Stole16
rworldoffice
 
2. CSS Chapter Roadmap and Full Source Code.pdf
2. CSS Chapter Roadmap and Full Source Code.pdf2. CSS Chapter Roadmap and Full Source Code.pdf
2. CSS Chapter Roadmap and Full Source Code.pdf
BdBangladesh
 
Front end ++: seo e flexbox
Front end ++: seo e flexboxFront end ++: seo e flexbox
Front end ++: seo e flexbox
Fernanda Bernardo
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
James Pearce
 
Devoxx 2014-webComponents
Devoxx 2014-webComponentsDevoxx 2014-webComponents
Devoxx 2014-webComponents
Cyril Balit
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
Timothy Fisher
 
ppt.pptx
ppt.pptxppt.pptx
ppt.pptx
AnasKhan937513
 
引き出しとしてのDjango - SoozyCon7
引き出しとしてのDjango - SoozyCon7引き出しとしてのDjango - SoozyCon7
引き出しとしてのDjango - SoozyCon7
makoto tsuyuki
 
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
Coulawrence
 
Polymer 1.0
Polymer 1.0Polymer 1.0
Polymer 1.0
Cyril Balit
 
Polymer
PolymerPolymer
Polymer
Cyril Balit
 
jQuery Mobile - Desenvolvimento para dispositivos móveis
jQuery Mobile - Desenvolvimento para dispositivos móveisjQuery Mobile - Desenvolvimento para dispositivos móveis
jQuery Mobile - Desenvolvimento para dispositivos móveis
Pablo Garrido
 
Introduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.jsIntroduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.js
monterail
 
jQuery Mobile Introduction ( demo on EZoapp )
jQuery Mobile Introduction ( demo on EZoapp )jQuery Mobile Introduction ( demo on EZoapp )
jQuery Mobile Introduction ( demo on EZoapp )
EZoApp
 
web design and jQuery introduction in persian
web design and jQuery introduction in persianweb design and jQuery introduction in persian
web design and jQuery introduction in persian
Ahmad Badpey
 
DOM.pptx
DOM.pptxDOM.pptx
DOM.pptx
MattMarino13
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
Rob Bontekoe
 
Client-side Transformations
Client-side TransformationsClient-side Transformations
Client-side Transformations
John Boxall
 
Hmmmm
HmmmmHmmmm
Hmmmm
vian_89
 

Similar to Javascript (20)

Imageslider
ImagesliderImageslider
Imageslider
 
Stole16
Stole16Stole16
Stole16
 
2. CSS Chapter Roadmap and Full Source Code.pdf
2. CSS Chapter Roadmap and Full Source Code.pdf2. CSS Chapter Roadmap and Full Source Code.pdf
2. CSS Chapter Roadmap and Full Source Code.pdf
 
Front end ++: seo e flexbox
Front end ++: seo e flexboxFront end ++: seo e flexbox
Front end ++: seo e flexbox
 
HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2HTML5 and the dawn of rich mobile web applications pt 2
HTML5 and the dawn of rich mobile web applications pt 2
 
Devoxx 2014-webComponents
Devoxx 2014-webComponentsDevoxx 2014-webComponents
Devoxx 2014-webComponents
 
HTML5 New and Improved
HTML5   New and ImprovedHTML5   New and Improved
HTML5 New and Improved
 
ppt.pptx
ppt.pptxppt.pptx
ppt.pptx
 
引き出しとしてのDjango - SoozyCon7
引き出しとしてのDjango - SoozyCon7引き出しとしてのDjango - SoozyCon7
引き出しとしてのDjango - SoozyCon7
 
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
TURN YOUR CELL PHONE FROM A LIABILITY INTO AN ASSET!
 
Polymer 1.0
Polymer 1.0Polymer 1.0
Polymer 1.0
 
Polymer
PolymerPolymer
Polymer
 
jQuery Mobile - Desenvolvimento para dispositivos móveis
jQuery Mobile - Desenvolvimento para dispositivos móveisjQuery Mobile - Desenvolvimento para dispositivos móveis
jQuery Mobile - Desenvolvimento para dispositivos móveis
 
Introduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.jsIntroduction to modern front-end with Vue.js
Introduction to modern front-end with Vue.js
 
jQuery Mobile Introduction ( demo on EZoapp )
jQuery Mobile Introduction ( demo on EZoapp )jQuery Mobile Introduction ( demo on EZoapp )
jQuery Mobile Introduction ( demo on EZoapp )
 
web design and jQuery introduction in persian
web design and jQuery introduction in persianweb design and jQuery introduction in persian
web design and jQuery introduction in persian
 
DOM.pptx
DOM.pptxDOM.pptx
DOM.pptx
 
Building iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" DominoBuilding iPhone Web Apps using "classic" Domino
Building iPhone Web Apps using "classic" Domino
 
Client-side Transformations
Client-side TransformationsClient-side Transformations
Client-side Transformations
 
Hmmmm
HmmmmHmmmm
Hmmmm
 

Recently uploaded

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 

Recently uploaded (20)

Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 

Javascript

  • 1. <!DOCTYPE html>background <html> <body> <h1>Hello World!</h1> <button onclick="myFunction()">Setbackground</button> <script> functionmyFunction() { document.body.style.background="#f3f3f3 url('img_tree.png') no-repeatrighttop"; } </script> </body> </html> <!DOCTYPE html>backgroundAttachment <html> <head> <style> body { background: #f3f3f3 url('img_tree.png') no-repeatrighttop; } </style> </head> <body> <h1>Hello World!</h1> <p><b>Tip:</b> Try to to resize the window ifthe scrollbar is not available.</p> <p><b>Tip:</b> Scroll the page before and after you have clickedthe button.</p> <button onclick="myFunction()">Setbackgroundimage to be fixed</button> <br> <script> functionmyFunction() { document.body.style.backgroundAttachment="fixed"; } </script> <p>Some text to enable scrolling.. <br><br><br><br> <br><br><br><br> </p> </body> </html>
  • 2. <!DOCTYPE html>backgroundColor <html> <body> <h1>Hello World!</h1> <button type="button" onclick="myFunction()">Setbackground color</button> <script> functionmyFunction() { document.body.style.backgroundColor="red"; } </script> </body> </html> <!DOCTYPE html>backgroundImage <html> <body> <h1>Hello World!</h1> <button type="button" onclick="myFunction()">Setbackgroundimage</button> <script> functionmyFunction() { document.body.style.backgroundColor="#f3f3f3"; document.body.style.backgroundImage ="url('img_tree.png')"; } </script> </body> </html> <!DOCTYPE html>backgroundPosition <html> <head> <style> body { background-image:url('img_tree.png'); background-repeat:no-repeat; } </style> </head> <body> <button type="button" onclick="myFunction()">Positionbackgroundimage</button>
  • 3. <script> functionmyFunction() { document.body.style.backgroundPosition="topright"; } </script> </body> </html> <!DOCTYPE html>backgroundRepeat <html> <head> <style> body { background: #f3f3f3 url('img_tree.png'); } </style> </head> <body> <h1>Hello World!</h1> <button type="button" onclick="myFunction()">Setbackground image to no-repeat</button> <script> functionmyFunction() { document.body.style.backgroundRepeat= "no-repeat"; } </script> </body> </html> <!DOCTYPE html>backgroundClip <html> <head> <style> #myDIV { width: 300px; height:300px; padding: 50px; background-color: coral; background-clip:border-box; color: white; border: 5px dotted lightgrey; } </style> </head> <body>
  • 4. <p>Click the "Try it" button to setthe background-clipproperty of the DIV elementto "content- box":</p> <button onclick="myFunction()">Tryit</button> <div id="myDIV"> Lorem ipsumdolor sit amet, consectetueradipiscingelit,seddiam nonummynibh euismodtincidunt ut laoreetdolore magna aliquam erat volutpat. Ut wisi enimad minimveniam,quis nostrud exerci </div> <script> functionmyFunction() { document.getElementById("myDIV").style.backgroundClip="content-box"; } </script> </body> </html> <!DOCTYPE html>backgroundSize <html> <head> <style> #myDIV { border: 1px solid black; width: 300px; height:300px; background: url('smiley.gif') no-repeat; } </style> </head> <body> <p>Click the "Try it" button to enlarge the background-size of the DIV element:</p> <button onclick="myFunction()">Tryit</button> <div id="myDIV"> <h1>Hello</h1> </div> <script> functionmyFunction() { document.getElementById("myDIV").style.backgroundSize ="60px120px"; } </script> </body> </html>
  • 5. <!DOCTYPE html>backfaceVisibility <html> <head> <style> div { width: 100px; height:100px; background: red; color: white; -webkit-animation:mymove 2s infinite linearalternate;/* Chrome,Safari, Opera */ animation: mymove 2s infinite linearalternate; } /* Chrome,Safari, Opera */ @-webkit-keyframesmymove { to {-webkit-transform:rotateY(180deg);} } @keyframesmymove { to {transform: rotateY(180deg);} } </style> </head> <body> <p>Check/uncheck the checkbox to change the backface-visibilityofthe animated DIV element:</p> <div id="myDIV"> <h1>Hello</h1> </div> <input type="checkbox" onclick="myFunction(this)" checked>backface-visibility <script> functionmyFunction(x) { if(x.checked=== true) { document.getElementById("myDIV").style.WebkitBackfaceVisibility="visible";//Code for Chrome, Safari, Opera document.getElementById("myDIV").style.backfaceVisibility="visible"; } else { document.getElementById("myDIV").style.WebkitBackfaceVisibility="hidden";// Code for Chrome,Safari, Opera document.getElementById("myDIV").style.backfaceVisibility="hidden"; } } </script> <p><strong>Note:</strong> The backface-visibilityandbackfaceVisibilitypropertiesare notsupported in InternetExplorer9 and earlierversions.</p>
  • 6. </body> </html> <!DOCTYPE html>border <html> <body> <div id="myDiv">Thisisa div element.</div> <br> <button type="button" onclick="myFunction()">Setborder</button> <script> functionmyFunction() { document.getElementById("myDiv").style.border="thicksolid #0000FF"; } </script> </body> </html> document.getElementById("myDiv").style.borderBottom="thicksolid#0000FF"; document.getElementById("myDiv").style.borderBottomColor="red"; <!DOCTYPE html>borderBottomLeftRadius <html> <head> <style> #myDIV { border: 1px solid black; width: 300px; height:300px; } </style> </head> <body> <p>Click the "Try it" button to change the border-bottom-left-radiuspropertyofthe DIV element:</p> <button onclick="myFunction()">Tryit</button> <div id="myDIV"> <h1>Hello</h1> </div> <script> functionmyFunction() { document.getElementById("myDIV").style.borderBottomLeftRadius="25px"; document.getElementById("myDIV").style.borderBottomLeftRadius="25px";
  • 7. } </script> </body> </html> <!DOCTYPE html>borderBottomStyle <html> <body> <div id="myDiv">Thisisa div.</div> <br> <button type="button" onclick="myFunction()">Setsolidbottomborder</button> <script> functionmyFunction() { document.getElementById("myDiv").style.borderBottomStyle="solid"; } </script> </body> </html> <!DOCTYPE html>borderBottomWidth <html> <head> <style> #myDiv { border-style:solid; } </style> </head> <body> <div id="myDiv">Thisisa div element.</div> <br> <button type="button" onclick="myFunction()">Change widthofthe bottom border</button> <script> functionmyFunction() { document.getElementById("myDiv").style.borderBottomWidth="10px"; } </script> </body> </html>
  • 8. <!DOCTYPE html>borderCollapse <html> <body> <table id="myTable" border="1"> <tr> <th>Month</th> <th>Savings</th> </tr> <tr> <td>January</td> <td>$100</td> </tr> <tr> <td>February</td> <td>$150</td> </tr> </table> <br> <button type="button" onclick="myFunction()">Collapseborder</button> <script> functionmyFunction() { document.getElementById("myTable").style.borderCollapse ="collapse"; } </script> </body> </html> <!DOCTYPE html>borderColor <html> <head> <style> #myDiv { border: thick solidblue; } </style> </head> <body> <div id="myDiv">Thisisa div.</div> <br> <button type="button" onclick="myFunction()">Change colorofthe four borders</button> <script> functionmyFunction() { document.getElementById("myDiv").style.borderColor="red"; } </script> </body> </html>
  • 9. <!DOCTYPE html>borderColor <html> <head> <style> #myDIV { border: 15px solidtransparent; width: 250px; padding: 10px 20px; -webkit-border-image:url(border.png) 3030 stretch; /* Safari 5 */ -o-border-image:url(border.png) 3030 stretch; /* Opera 12 */ border-image:url(border.png) 30 30 stretch; } </style> </head> <body> <p>Click the "Try it" button to change the border-image propertyof the DIV element:</p> <button onclick="myFunction()">Tryit</button> <div id="myDIV"> <h1>Hello</h1> </div> <script> functionmyFunction() { document.getElementById("myDIV").style.WebkitBorderImage ="url(border.png) 30 30 round"; /* Code for Safari 5 */ document.getElementById("myDIV").style.OBorderImage ="url(border.png) 30 30 round"; /* Code for Opera 12 */ document.getElementById("myDIV").style.borderImage ="url(border.png) 3030 round"; } </script> </body> </html> <!DOCTYPE html>boxShadow <html> <head> <style> #myDIV { position:absolute; width: 100px; height:100px; background-color: coral; color: white; } </style> </head>
  • 10. <body> <p>Click the "Try it" button to setthe boxShadow property of the DIV element:</p> <button onclick="myFunction()">Tryit</button> <div id="myDIV"> <h1>myDIV</h1> </div> <script> functionmyFunction() { document.getElementById("myDIV").style.boxShadow="10px 20px 30px lightblue"; } </script> </body> </html> <!DOCTYPE html>display <html> <head> <style> #myDIV { width: 500px; height:500px; background-color: lightblue; } </style> </head> <body> <p>Click the "Try it" button to setthe displayproperty of the DIV elementto"none":</p> <button onclick="myFunction()">Tryit</button> <div id="myDIV"> This is my DIV element. </div> <p><b>Note:</b> The elementwill nottake up any space whenthe displayproperty set to "none".</p> <script> functionmyFunction() { document.getElementById("myDIV").style.display="none"; } </script> </body> </html>
  • 11. <!DOCTYPE html>Style cursor Property <html> <body> <p id="myP">Mouse overthis textbefore and after you have clickedthe button below!</p> <button type="button" onclick="myFunction()">Change cursor</button> <script> functionmyFunction() { document.getElementById("myP").style.cursor= "pointer"; } </script> </body> </html> <!DOCTYPE html>font <html> <body> <p id="myP">Thisis a paragraph.</p> <button type="button" onclick="myFunction()">Setfont</button> <script> functionmyFunction() { document.getElementById("myP").style.font="italicbold 20px arial,serif"; } </script> </body> </html> document.getElementById("myP").style.fontFamily="Impact,Charcoal,sans-serif"; document.getElementById("myP").style.fontFamily="Impact,Charcoal,sans-serif"; document.getElementById("myP").style.fontSize ="xx-large"; document.getElementById("myP").style.fontStyle="italic"; document.getElementById("myP").style.fontVariant="small-caps"; document.getElementById("myBtn").style.height="50px"; document.getElementById("main".style.justifyContent="space-between"; document.getElementById("myBtn").style.left="100px"; document.getElementById("myP").style.letterSpacing="15px";
  • 12. document.getElementById("myDiv").style.lineHeight="3"; document.getElementById("myList").style.listStyle ="decimal inside"; document.getElementById("myList").style.listStyleImage="url('sqorange.gif')"; document.getElementById("myDiv").style.margin="50px 10px 20px 30px"; document.getElementById("myDiv").style.marginBottom="50px"; <!DOCTYPE html>overflow <html> <head> <style> #myDIV { border: 1px solid black; background-color: lightblue; width: 300px; height:210px; overflow:visible; } </style> </head> <body> <p>Click the "Try it" button to change the overflowproperty ofthe DIV element:</p> <button onclick="myFunction()">Tryit</button> <div id="myDIV"> Lorem ipsumdolor sit amet, consectetueradipiscingelit,seddiam nonummynibh euismodtincidunt ut laoreetdolore magna aliquam erat volutpat. Ut wisi enimad minimveniam,quis nostrud exerci type extra </div> <script> functionmyFunction() { document.getElementById("myDIV").style.overflow="scroll"; } </script> </body> </html> document.getElementById("myDIV").style.overflowX="scroll"; document.getElementById("myDIV").style.overflowX="scroll"; document.getElementById("myDiv").style.padding="50px 10px 20px 30px"; <!DOCTYPE html> Transform <html> <head> <style> #myDIV { margin: auto; border: 1px solid black;
  • 13. width: 200px; height:100px; background-color: coral; color: white; } </style> </head> <body> <p>Click the "Try it" button to rotate the DIV element:</p> <button onclick="myFunction()">Tryit</button> <div id="myDIV"> <h1>myDIV</h1> </div> <script> functionmyFunction() { // Code for Chrome, Safari, Opera document.getElementById("myDIV").style.WebkitTransform="rotate(20deg)"; // Code for IE9 document.getElementById("myDIV").style.msTransform="rotate(20deg)"; // Standard syntax document.getElementById("myDIV").style.transform="rotate(20deg)"; } </script> </body> </html> <!DOCTYPE html>transitionTimingFunction <html> <head> <style> #myDIV { border: 1px solid black; background-color: lightblue; width: 270px; height:200px; overflow:auto; -webkit-transition:all 2s; /* For Safari 3.1 to 6.0 */ transition: all 2s; } #myDIV:hover { background-color: coral; width: 570px; height:500px; padding: 100px;
  • 14. border-radius:50px; } </style> </head> <body> <p>Mouse overthe DIV elementand it will change,gradually, both in color and size!</p> <p>Click the "Try it" button and mouse over the DIV elementagain. The changes will now happen ina linearspeedcurve.</p> <button onclick="myFunction()">Tryit</button> <div id="myDIV"> <h1>myDIV</h1> </div> <script> functionmyFunction() { document.getElementById("myDIV").style.WebkitTransitionTimingFunction="linear";// Code for Safari 3.1 to 6.0 document.getElementById("myDIV").style.transitionTimingFunction ="linear"; // Standard syntax } </script> <p><strong>Note:</strong> The transitionTimingFunctionpropertyis supportedin InternetExplorer 10, Firefox,Opera,and Chrome.</p> <p>Safari supports an alternative,the WebkitTransitionTimingFunctionproperty.</p> </body> </html>