We generally use Photoshop, such as drawing tools to make TV scan line effect Picture: First do a black-and-white pattern, and then fill with this pattern, and then adjust the pattern or transparency of the layer, the effect came out.
Now we do not use Photoshop, CSS and JavaScript, and the method is simple!
One, the preparation of a picture, named Photo1.jpg, size: 240x180;
Second, insert a table, the table long x width set to 240x180, the cellpadding, cellspacing, border are set to 0, and the background of the table set to the above picture, that code is: <table cellpadding= "0" cellspacing= "0" border= "0"
Width= "height=" "180" background= "Photo1.jpg" >
</table>
Third, create a CSS style, apply the style to the above table, the style code is as follows. #000000代表黑色, you can also change to other colors you like. The following Filter:alpha (OPACITY=30) is a CSS filter that adjusts the transparency of thin lines. <BR><BR> TVLine td{border-top:1 solid #000000; Font:1px;filter:alpha (opacity=30)} Iv. Insert a small snippet of JavaScript code in a table:
for (n=1;n ')//note TD has a full-width space in the middle;//document.write (")///In view of browser compatibility, you can also use the above sentence
The code for the entire page is as follows:
. tvline td{border-top:1 solid #000000; Font:1px;filter:alpha (opacity=30)} for (N=1;n ')
Now save the page and preview the effect: