From 9465420e357e4aa539eb927ae35b9c33a662f3b4 Mon Sep 17 00:00:00 2001 From: Joshua Moerman Date: Sun, 10 Mar 2013 12:08:45 +0100 Subject: [PATCH] made bullets position correctly --- index.html | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 4ba9901..61ed2e8 100644 --- a/index.html +++ b/index.html @@ -13,10 +13,18 @@ opacity: 0.5; } .user { - -webkit-transition: left 0.5s, top 0.5s; - font-size: 20px; + -webkit-transition: left 0.5s linear, top 0.5s linear; position: absolute; } + .user .bullet { + width: 10px; + height: 10px; + position: absolute; + left: -5px; + top: -5px; + border-radius: 5px; + background-color: #f00; + } .user .name { border-radius: 2px; font-size: 12px; @@ -30,11 +38,11 @@ var websocket; function init() { - document.getElementById("myName").innerHTML = myName; if ("WebSocket" in window){ + document.getElementById("myName").innerHTML = myName; testWebSocket(); } else { - document.getElementById("status").innerHTML = 'No websockets :('; + document.getElementById("status").innerHTML = 'No websockets :(. This means that you either use Internet Explorer or Android. In both cases, I suggest that you use Chrome or Firefox!'; } } function testWebSocket() { @@ -65,7 +73,7 @@ var user = document.createElement('div'); user.id = people[i].name; user.className = 'user'; - user.innerHTML = '• '; + user.innerHTML = '
'; user.appendChild(name); user.style.left = people[i].position.x + "px"; user.style.top = people[i].position.y + "px";