Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to achieve a table row separator with gradient effect
    primarykey
    data
    text
    <p>Here is the <a href="http://jsfiddle.net/qs9Lv/2/" rel="nofollow noreferrer">fiddle</a> example.</p> <p>I have a separator class:</p> <pre><code> &lt;div class='seperator-gradient'&gt;&lt;/div&gt; </code></pre> <p>I also have a table:</p> <pre><code>&lt;table class="TABLE"&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt; &lt;/tr&gt; </code></pre> <p></p> <p>CSS file:</p> <pre><code> .seperator-gradient{ width: 100%; height: 1px; border-bottom: background: #c4c4c4; /* Old browsers */ background: -moz-linear-gradient(left, #ffffff 0%, #e3e3e3 10%, #b8b8b8 50%, #e3e3e3 90%, #fcfcfc 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, right top, color-stop(0%,#ffffff), color-stop(10%,#e3e3e3), color-stop(50%,#b8b8b8), color-stop(90%,#e3e3e3), color-stop(100%,#fcfcfc)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(left, #ffffff 0%,#e3e3e3 10%,#b8b8b8 50%,#e3e3e3 90%,#fcfcfc 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(left, #ffffff 0%,#e3e3e3 10%,#b8b8b8 50%,#e3e3e3 90%,#fcfcfc 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(left, #ffffff 0%,#e3e3e3 10%,#b8b8b8 50%,#e3e3e3 90%,#fcfcfc 100%); /* IE10+ */ background: linear-gradient(to right, #ffffff 0%,#e3e3e3 10%,#b8b8b8 50%,#e3e3e3 90%,#fcfcfc 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#fcfcfc',GradientType=1 ); /* IE6-9 */ } .TABLE{ width: 100%; border-spacing: 0; border-collapse: collapse; font-size: 14px; } .TABLE TR:nth-child(odd) { background-color:#f0f0f0; height: 50px; } .TABLE TR:nth-child(even) { background-color:#fff; height: 50px; } .TABLE TD { vertical-align: middle; } </code></pre> <p>now I'd like the table's border has the same feature like what I have achieved in seperator-gradient class...strong color in middle but change to lighter color to left and right.is it possible?</p> <p>By the way, the table's contents were loaded using underscore at running time:</p> <pre><code> &lt;table class="TABLE"&gt; {% _.each(datas,function(c){%} &lt;tr&gt;&lt;td&gt;{{ c.name }}&lt;/td&gt; &lt;/tr&gt; {% });%} &lt;/table&gt; </code></pre> <p>This is what I'd like to achieve:</p> <p><img src="https://i.stack.imgur.com/MTrAN.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload