Introduction


- Go to Solution Explorer
- Right-click on the Application name
- Select Add-->add new item
- Now in the window that opens, select an HTML page or new Webform
- Rename it by Rotational text.aspx

- body {
- background: #FFFF99;
- color: #fff;
- font: 300 100.1% "Helvetica Neue" , Helvetica, "Arial Unicode MS" , Arial, sans-serif;
- }
- #holder {
- height: 442px;
- left: 42%;
- margin: -240px 0 0 -320px;
- position: absolute;
- top: 57%;
- width: 842px;
- font-size: x-large;
- background-color: #008000;
- }
- #duplicate {
- bottom: 0;
- font: 300 .7em "Helvetica Neue", Helvetica,;
- position: absolute;
- right: 1em;
- text-align: right;
- }
- #duplicate d {
- color: #fff;
- }
- body {
- background: #fff;
- color: #000;
- font: 100.1% "Comic Sans MS", Lucida, Verdana, sans-serif;
- }
- #holder {
- height: 480px;
- left: 50%;
- margin: 0 0 0 -320px;
- position: absolute;
- top: 0;
- width: 640px;
- }
- #duplicate {
- bottom: 0;
- font-size: .7em;
- position: absolute;
- right: 1em;
- text-align: right;
- }
- txt = [], attr = {
- font: "50px Helvetica",
- opacity: 0.5
- };
- txt[0] = R.text(320, 240, text).attr(attr).attr({
- fill: "#0f0"
- });
- txt[1] = R.text(320, 240, text).attr(attr).attr({
- fill: "#f00"
- });
- txt[2] = R.text(320, 240, text).attr(attr).attr({
- fill: "#00f"
- });
The code shown above tells us that the R named variable is holding the Color () and the id holder is passed in it. By these lines, the text will display in a different color in the browser. The mouse event is fired when you put the mouse in the text while it is being displayed on the browser.
The whole JavaScript looks as follows.
- Color(function() {
- var hldr = document.getElementById("holder"),
- text = hldr.innerHTML.replace(/^\s+|\s+$|<[^>]+>/g, "");
- hldr.innerHTML = "";
- var R = Color("holder", 640, 480),
- txt = [],
- attr = {
- font: "50px Helvetica",
- opacity: 0.5
- };
- txt[0] = R.text(320, 240, text).attr(attr).attr({
- fill: "#0f0"
- });
- txt[1] = R.text(320, 240, text).attr(attr).attr({
- fill: "#f00"
- });
- txt[2] = R.text(320, 240, text).attr(attr).attr({
- fill: "#00f"
- });
- var mouse = null,
- rot = 0;
- document.onmousemove = function(e) {
- e = e || window.event;
- if (mouse == null) {
- mouse = e.clientX;\
- return;
- }
- rot += e.clientX - mouse;
- txt[0].attr({
- transform: "r" + rot
- });
- txt[1].attr({
- transform: "r" + rot / 1.5
- });
- txt[2].attr({
- transform: "r" + rot / 2
- });
- mouse = e.pageX;
- };
- });
- <body>
- <div id="holder">
- <p>C-sharp Corner Rocks</p>
- </div>
- </body>
- <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Roational text.aspx.cs" Inherits="html5article._Default" %>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html
- xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <meta charset="utf-8">
- <title></title>
- <link rel="stylesheet" href="d1.css" media="screen">
- <link rel="stylesheet" href="d2.css" media="print">
- <script src="dee.js"></script>
- <script src="rotation.js"></script>
- </head>
- <body>
- <div id="holder">
- <p>C-sharp Corner Rocks</p>
- </div>
- </body>
- </html>


Convert Microsoft Office Word to other formats (pdf, html, rtf, xps)
NotePad 2008
Simple Login Form using HTML 5

Join the conversation! Your thoughts help the community grow.