Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
<script type="text/javascript" src="behavior.js"></script>
Behaviour.register({
'.dropshadow' : function(element) {
var wrap1 = document.createElement("div");
wrap1.setAttribute("class", "wrap1");
var wrap2 = document.createElement("div");
wrap2.setAttribute("class", "wrap2");
var wrap3 = document.createElement("div");
wrap3.setAttribute("class", "wrap3");
var outerNode = element.parentNode;
outerNode.insertBefore(wrap1, element);
wrap1.appendChild(wrap2);
wrap2.appendChild(wrap3);
outerNode.removeChild(element);
wrap3.appendChild(element);
}
});
.wrap1, .wrap2, .wrap3 {
display:inline-table;
/* \*/display:block;/**/
}
.wrap1 {
float: left;
background:url(/files/shadow.gif) right bottom no-repeat;
}
.wrap2 {
background:url(/files/corner_bl.gif) -4px 100% no-repeat;
}
.wrap3 {
padding:0 16px 16px 0;
background:url(/files/corner_tr.gif) 100% -4px no-repeat;
}
.wrap3 img {
display:block;
border:1px solid #ccc;
border-color:#efefef #ccc #ccc #efefef;
}
<script type="text/javascript" src="http://bennolan.com/behaviour/behaviour.js"></script>
<script type="text/javascript"><!--
Behaviour.register({
'.dropshadow' : function(element) {
var wrap1 = document.createElement("div");
wrap1.setAttribute("class", "wrap1");
var wrap2 = document.createElement("div");
wrap2.setAttribute("class", "wrap2");
var wrap3 = document.createElement("div");
wrap3.setAttribute("class", "wrap3");
var outerNode = element.parentNode;
outerNode.insertBefore(wrap1, element);
wrap1.appendChild(wrap2);
wrap2.appendChild(wrap3);
outerNode.removeChild(element);
wrap3.appendChild(element);
}
});
//--></script>
<style type="text/css">
.wrap1, .wrap2, .wrap3 {
display: inline-table;
/* \*/display: block;/**/
}
.wrap1 {
float: left;
background: url(http://www.ploughdeep.com/onionskin/images/shadows/v2/shadow.gif) right bottom no-repeat;
}
.wrap2 {
background: url(http://www.ploughdeep.com/onionskin/images/shadows/v2/corner_bl.gif) -4px 100% no-repeat;
}
.wrap3 {
padding: 0 6px 6px 0;
background: url(http://www.ploughdeep.com/onionskin/images/shadows/v2/corner_tr.gif) 100% -4px no-repeat;
}
.wrap3 img {
display: block;
}
</style>
…
<img src="http://www.ploughdeep.com/onionskin/images/ball.jpg" class="dropshadow">