在输入框左边加一个小图标,css样式应该怎么

html-css023

在输入框左边加一个小图标,css样式应该怎么,第1张

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html charset=utf-8" />

<title>无标题文档</title>

<style>

.text{border:solid 2px #cccwidth:400pxheight:40pxbackground:url(http://d.lanrentuku.com/down/png/1211/blueberry/user_friend.png) no-repeat 0 center}

.text input{float:leftborder:nonebackground:noneheight:40pxline-height:30pxwidth:100% text-indent:32px}

</style>

</head>

<body>

<div class="text">

<input type="text"/>

</div>

</body>

</html>

如果你闲的蛋疼,我不阻拦你。你可以试着用div模拟像素的概念来生成一张图片。

首先你得先定义一个css来格式化所有的div(即像素):

<style type="text/css">

    .formatAll {

        width: 25px

        height: 25px

        position: absolute

    }

然后再设置各个div的颜色、位置。以前闲着蛋疼随便做了一个,刚好还保留着:

<!--第1行-->

<div class="formatAll" style="top: 0px left: 0px background-color: #ffffff"></div>

<div class="formatAll" style="top: 0px left: 25px background-color: ##ffffff"></div>

<div class="formatAll" style="top: 0px left: 50px background-color: #451211"></div>

<div class="formatAll" style="top: 0px left: 75px background-color: #451211"></div>

<div class="formatAll" style="top: 0px left: 100px background-color: #451211"></div>

<div class="formatAll" style="top: 0px left: 125px background-color: ##ffffff"></div>

<div class="formatAll" style="top: 0px left: 150px background-color: ##ffffff"></div>

<div class="formatAll" style="top: 0px left: 175px background-color: ##ffffff"></div>

<!--第2行-->

<div class="formatAll" style="top: 25px left: 0px background-color: #ffffff"></div>

<div class="formatAll" style="top: 25px left: 25px background-color: #451211"></div>

<div class="formatAll" style="top: 25px left: 50px background-color: #e0d73e"></div>

<div class="formatAll" style="top: 25px left: 75px background-color: #e0d73e"></div>

<div class="formatAll" style="top: 25px left: 100px background-color: #e0d73e"></div>

<div class="formatAll" style="top: 25px left: 125px background-color: #e0d73e"></div>

<div class="formatAll" style="top: 25px left: 150px background-color: #ffffff"></div>

<div class="formatAll" style="top: 25px left: 175px background-color: #c8a4a4"></div>

<!--第3行-->

<div class="formatAll" style="top: 50px left: 0px background-color: #ffffff"></div>

<div class="formatAll" style="top: 50px left: 25px background-color: #e0d73e"></div>

<div class="formatAll" style="top: 50px left: 50px background-color: #e0d73e"></div>

<div class="formatAll" style="top: 50px left: 75px background-color: #000000"></div>

<div class="formatAll" style="top: 50px left: 100px background-color: #e0d73e"></div>

<div class="formatAll" style="top: 50px left: 125px background-color: #000000"></div>

<div class="formatAll" style="top: 50px left: 150px background-color: #ffffff"></div>

<div class="formatAll" style="top: 50px left: 175px background-color: #c8a4a4"></div>

<!--第4行-->

<div class="formatAll" style="top: 75px left: 0px background-color: #ffffff"></div>

<div class="formatAll" style="top: 75px left: 25px background-color: #f0350a"></div>

<div class="formatAll" style="top: 75px left: 50px background-color: #f0350a"></div>

<div class="formatAll" style="top: 75px left: 75px background-color: #f0350a"></div>

<div class="formatAll" style="top: 75px left: 100px background-color: #f0350a"></div>

<div class="formatAll" style="top: 75px left: 125px background-color: #f0350a"></div>

<div class="formatAll" style="top: 75px left: 150px background-color: #ffffff"></div>

<div class="formatAll" style="top: 75px left: 175px background-color: #c8a4a4"></div>

<!--第5行-->

<div class="formatAll" style="top: 100px left: 0px background-color: #024319"></div>

<div class="formatAll" style="top: 100px left: 25px background-color: #024319"></div>

<div class="formatAll" style="top: 100px left: 50px background-color: #529a34"></div>

<div class="formatAll" style="top: 100px left: 75px background-color: #f0350a"></div>

<div class="formatAll" style="top: 100px left: 100px background-color: #f0350a"></div>

<div class="formatAll" style="top: 100px left: 125px background-color: #f0350a"></div>

<div class="formatAll" style="top: 100px left: 150px background-color: #024319"></div>

<div class="formatAll" style="top: 100px left: 175px background-color: #eae3c7"></div>

<!--第6行-->

<div class="formatAll" style="top: 125px left: 0px background-color: #eae3c7"></div>

<div class="formatAll" style="top: 125px left: 25px background-color: #024319"></div>

<div class="formatAll" style="top: 125px left: 50px background-color: #529a34"></div>

<div class="formatAll" style="top: 125px left: 75px background-color: #529a34"></div>

<div class="formatAll" style="top: 125px left: 100px background-color: #f0350a"></div>

<div class="formatAll" style="top: 125px left: 125px background-color: #529a34"></div>

<div class="formatAll" style="top: 125px left: 150px background-color: #ffffff"></div>

<div class="formatAll" style="top: 125px left: 175px background-color: #451211"></div>

<!--第7行-->

<div class="formatAll" style="top: 150px left: 0px background-color: #eae3c7"></div>

<div class="formatAll" style="top: 150px left: 25px background-color: #024319"></div>

<div class="formatAll" style="top: 150px left: 50px background-color: #529a34"></div>

<div class="formatAll" style="top: 150px left: 75px background-color: #529a34"></div>

<div class="formatAll" style="top: 150px left: 100px background-color: #f0350a"></div>

<div class="formatAll" style="top: 150px left: 125px background-color: #529a34"></div>

<div class="formatAll" style="top: 150px left: 150px background-color: #ffffff"></div>

<div class="formatAll" style="top: 150px left: 175px background-color: #ffffff"></div>

<!--第8行-->

<div class="formatAll" style="top: 175px left: 0px background-color: #ffffff"></div>

<div class="formatAll" style="top: 175px left: 25px background-color: #024319"></div>

<div class="formatAll" style="top: 175px left: 50px background-color: #024319"></div>

<div class="formatAll" style="top: 175px left: 75px background-color: #024319"></div>

<div class="formatAll" style="top: 175px left: 100px background-color: #024319"></div>

<div class="formatAll" style="top: 175px left: 125px background-color: #024319"></div>

<div class="formatAll" style="top: 175px left: 150px background-color: #ffffff"></div>

<div class="formatAll" style="top: 175px left: 175px background-color: #ffffff"></div>

<!--第9行-->

<div class="formatAll" style="top: 200px left: 0px background-color: #ffffff"></div>

<div class="formatAll" style="top: 200px left: 25px background-color: #451211"></div>

<div class="formatAll" style="top: 200px left: 50px background-color: #c8a4a4"></div>

<div class="formatAll" style="top: 200px left: 75px background-color: #ffffff"></div>

<div class="formatAll" style="top: 200px left: 100px background-color: #ffffff"></div>

<div class="formatAll" style="top: 200px left: 125px background-color: #451211"></div>

<div class="formatAll" style="top: 200px left: 150px background-color: #c8a4a4"></div>

<div class="formatAll" style="top: 200px left: 175px background-color: #ffffff"></div>

DVD区域码是由美国八大影业所共同制定的,为了保护各地区电影放映时的权益。

将全世界分成六个区域,并且限定每个区域中流通的DVD光盘必须设定影片区域码。如此一来,每个区域的戏院或家庭使用者就无法藉由平行输入或从价格低廉的区域取得廉价的光盘,而必须循正常管道取得,因而确保本身的权益。

所以世界各大影片商共同制定了这个保护限制。也就是所谓的CSS(Content Scrambling System)区域码保护。DVD区域码限制了DVD光盘可使用的国家。

例如:编码为北美(区域 1)的DVD光盘将无法在日本(区域 2)销售的播放器上播放。WinDVD提供使用者有五次的机会可供选择其所需要的区域码,当选择次数使用完毕后;WinDVD会限制于最后一次的区域码,日后,您只能播放该区域码的影片或全区、未锁码的影片。

现在世界被划分为六个区域。美国归属第一区域,中国大陆属于第六区域,详细如下:

一区:美国、加拿大

二区:西欧、日本、南非

三区:东南亚、中国香港、中国澳门、中国台湾

四区:澳大利亚、西班牙语拉丁美洲

五区:俄罗斯、东欧、非洲

六区:中国大陆

你可用一下方法破除区码限制:

我们买的DVD-ROM大多数都是6区的,如果看其他区域的DVD碟,则会提示区码保护(出现RPC-2……等字样)。于是出现了各种解决这种限制的方法。

一、破解DVD的Firmware

破解DVD的Firmware(以下简称FW),一种方法是利用无区码保护的FW对DVD-ROM进行更新。刷新FW分两种情况:一种是使用网上提供的EXE文件直接刷新FW(刷新工具和FW文件合二为一);另一种是使刷新工具(如MTKWinFlash),再配合专门的FW文件进行刷新。

需要注意的是,在刷新前务必弄清楚你的光驱的型号以及合适版本的FW文件,并保证不能断电,最好能够安装ASPI4.6版本的驱动。

另一种方法是无需刷新FW,使用特定的软件即可。下面以建兴和SONY为例,看看是如何解决区码限制的。首先下载“Rpcde2”这款免费软件。使用它很简单,解压运行后选择你的DVD光驱,然后单击“Disable”按钮,就可以除掉RPC-2保护了。目前该软件支持Liteon 163/D、166S、165H、122及SONY的1211、1611、1612,还有华旗的DVD-16X3H。笔者的建议是:有直接修改RPC的软件就尽量不要刷新FW!由于刷新FW本身风险较大,而且全区FW不少是民间高手的作品,还不能保证刷新后的性能,因此我们可以使用下面的方法来解决DVD区码限制。

二、使用软件来破解

使用DVDIdle pro这款工具。特性:

1.可以软修改区码,成为RPC-1模式的全区DVD-ROM。

2.拥有SmartRead(数据预读)技术,可以在看碟时将盘中的数据预读到硬盘中,从而延长DVD寿命。一般在看碟时它会自动读取DVD盘中的数据,大概一分钟多就可以预读11分钟的数据,这样看一盘100分钟DVD碟实际光驱只用了10~15分钟,保护了光头,并减少了发热量。

3.DVDIdle仍需要DVD播放软件配合(如PowerDVD、WinDVD等)才能工作。

具体使用:安装DVDIdle2.18并运行,在“Default DVD Drive”中选择你的DVD光驱,其他选项全选中。然后进入左侧的“Cache”项目中,这里就是SmartRead数据预读的界面,一般保持默认即可,不过如果你想预读数据再大一点,可以将“CacheSize”进行再次调整,不过不要太大,否则预读时间会很长。

第三行是Region区码项,软件默认已经是修改为全区码了,我们就不必再改了。第四项的Applications程序项中,DVDIdle已经列出了支持的DVD播放软件,还需要将它们“绑定”:单击“Add”添加按钮,再选择播放程序即可。

经过这么一番折腾,你的DVD-ROM不再有区码的困扰了,不管是哪一区的DVD,统统都能播放!