From 7012cff89d69a89409a23f32bbb30de2eaa4bf63 Mon Sep 17 00:00:00 2001 From: Sanj Date: Mon, 27 Jun 2011 20:23:56 +0530 Subject: [PATCH] use opacity instead of font-weight to prevent jumping of text --- radia.css | 8 ++++++++ radia.js | 10 ++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/radia.css b/radia.css index 6b5d6bf..311a736 100644 --- a/radia.css +++ b/radia.css @@ -20,3 +20,11 @@ -webkit-border-radius: 8px; } +text { + background-color: #ffff00; + opacity: 0.6; +} + +tspan { + font-weight: bold; +} diff --git a/radia.js b/radia.js index a020944..87adbe3 100644 --- a/radia.js +++ b/radia.js @@ -25,13 +25,15 @@ $(function() { $(window).resize(); $.getJSON("radia.json", {}, function(data) { var highlightCSS = { - 'fontWeight': 'bold', - 'backgroundColor': '#ffff00' + 'opacity': "1.0" +// 'fontWeight': 'bold', +// 'backgroundColor': '#ffff00' } var unhighlightCSS = { - 'fontWeight': 'normal', - 'backgroundColor': '#ffffff' + 'opacity': "0.6" +// 'fontWeight': 'normal', +// 'backgroundColor': '#ffffff' } var R = data;