Visualforce page
<apex:page >
<head>
<meta charset="UTF-8"/>
<title></title>
<script src="https://www.polymer-project.org/0.5/components/webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="https://www.polymer-project.org/0.5/components/paper-spinner/paper-spinner.html"/>
<style shim-shadowdom="">
paper-spinner.blue::shadow .circle {
border-color: #4285f4;
}
paper-spinner.red::shadow .circle {
border-color: #db4437;
}
paper-spinner.yellow::shadow .circle {
border-color: #f4b400;
}
paper-spinner.green::shadow .circle {
border-color: #0f9d58;
}
</style>
</head>
<body>
<paper-spinner class="blue" active=""></paper-spinner>
<paper-spinner class="red" active=""></paper-spinner>
<paper-spinner class="yellow" active=""></paper-spinner>
<paper-spinner class="green" active=""></paper-spinner>
<paper-spinner active=""></paper-spinner>
<button>Toggle</button>
<script>
document.querySelector('button').addEventListener('click', function() {
var spinners = document.querySelectorAll('paper-spinner');
Array.prototype.forEach.call(spinners, function(spinner) {
spinner.active = !spinner.active;
});
});
</script>
</body>
</apex:page>
Demo: https://www.polymer-project.org/0.5/components/paper-elements/demo.html#paper-spinner
--------------------------------------------------------------------------------------------------------------------------
<apex:page >
<head>
<meta charset="UTF-8"/>
<title></title>
<script src="https://www.polymer-project.org/0.5/components/webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="https://www.polymer-project.org/0.5/components/paper-spinner/paper-spinner.html"/>
<style shim-shadowdom="">
paper-spinner.blue::shadow .circle {
border-color: #4285f4;
}
paper-spinner.red::shadow .circle {
border-color: #db4437;
}
paper-spinner.yellow::shadow .circle {
border-color: #f4b400;
}
paper-spinner.green::shadow .circle {
border-color: #0f9d58;
}
</style>
</head>
<body>
<paper-spinner class="blue" active=""></paper-spinner>
<paper-spinner class="red" active=""></paper-spinner>
<paper-spinner class="yellow" active=""></paper-spinner>
<paper-spinner class="green" active=""></paper-spinner>
<paper-spinner active=""></paper-spinner>
<button>Toggle</button>
<script>
document.querySelector('button').addEventListener('click', function() {
var spinners = document.querySelectorAll('paper-spinner');
Array.prototype.forEach.call(spinners, function(spinner) {
spinner.active = !spinner.active;
});
});
</script>
</body>
</apex:page>
Demo: https://www.polymer-project.org/0.5/components/paper-elements/demo.html#paper-spinner
--------------------------------------------------------------------------------------------------------------------------
No comments:
Post a Comment