diff --git a/R/cell_spec.R b/R/cell_spec.R
index aacac76..d83a8b1 100644
--- a/R/cell_spec.R
+++ b/R/cell_spec.R
@@ -23,13 +23,15 @@
 #' @param angle 0-360, degree that the text will rotate. Can be a vector.
 #' @param hover_message A vector of strings to be displayed as hover message.
 #' Of course, this feature is nly available in HTML.
+#' @param background_as_tile T/F value indicating if you want to have round
+#' cornered tile as background.
 #'
 #' @export
 cell_spec <- function(x, format,
                       bold = F, italic = F, monospace = F,
                       color = NULL, background = NULL,
                       align = NULL, font_size = NULL, angle = NULL,
-                      hover_message = NULL) {
+                      hover_message = NULL, background_as_tile = TRUE) {
 
   if (missing(format) || is.null(format)) format = getOption('knitr.table.format')
   if (is.null(format)) {
@@ -40,7 +42,7 @@
   if (tolower(format) == "html") {
     return(cell_spec_html(x, bold, italic, monospace,
                           color, background, align, font_size, angle,
-                          hover_message))
+                          hover_message, background_as_tile))
   }
   if (tolower(format) == "latex") {
     return(cell_spec_latex(x, bold, italic, monospace,
@@ -50,15 +52,21 @@
 
 cell_spec_html <- function(x, bold, italic, monospace,
                            color, background, align, font_size, angle,
-                           hover_message) {
+                           hover_message, background_as_tile) {
   cell_style <- NULL
   if (bold) cell_style <- paste(cell_style,"font-weight: bold;")
   if (italic) cell_style <- paste(cell_style, "font-style: italic;")
   if (monospace) cell_style <- paste(cell_style, "font-family: monospace;")
-  if (!is.null(color)) cell_style <- paste0(cell_style, "color: ", color, ";")
+  if (!is.null(color)) {
+    cell_style <- paste0(cell_style, "color: ", html_color(color), ";")
+  }
   if (!is.null(background)) {
-    cell_style <- paste0(cell_style, "border-radius: 4px; padding-right: 4px",
-                         ";padding-left: 4px; background-color: ", background, ";")
+    cell_style <- paste0(
+      cell_style,
+      ifelse(background_as_tile, "border-radius: 4px; ", ""),
+      "padding-right: 4px; padding-left: 4px; ",
+      "background-color: ", html_color(background), ";"
+    )
   }
   if (!is.null(align)) {
     cell_style <- paste0(cell_style, "text-align: ", align, ";")
@@ -71,7 +79,9 @@
                          "-webkit-transform: rotate(", angle,
                          "deg); -moz-transform: rotate(", angle,
                          "deg); -ms-transform: rotate(", angle,
-                         "deg); -o-transform: rotate(", angle, "deg);")
+                         "deg); -o-transform: rotate(", angle,
+                         "deg); transform: rotate(", angle,
+                         "deg);")
   }
 
   if (!is.null(hover_message)) {
@@ -96,7 +106,7 @@
   if (!is.null(background)) {
     background <- latex_color(background)
     x <- paste0("\\cellcolor", background, "{", x, "}")
-    }
+  }
   if (!is.null(align)) x <- paste0("\\multicolumn{1}{", align, "}{", x, "}")
   if (!is.null(angle)) x <- paste0("\\rotatebox{", angle, "}{", x, "}")
   return(x)
