小编PHP*_*PHP的帖子

什么是CSS中非常低效的规则

我在谷歌上进行了速度测试,我的CSS得分很高,成绩也很差.糟糕的成绩是由于CSS效率低下造成的.那是什么?我该如何纠正呢?

Very inefficient rules (good to fix on any page):
#menu ul ul li:first-child a:after    Tag key with 4 descendant selectors
#menu ul ul li:first-child a:hover:after    Tag key with 4 descendant selectors
Run Code Online (Sandbox Code Playgroud)

css

5
推荐指数
1
解决办法
393
查看次数

如何删除图像精灵中的边框

边框不会在下面的代码中删除,这是图像精灵.我尝试了一些方法来使用样式和边框0删除边框,但没有用.

<style>
img.home{width:40px;height:32px;
background:url(share.png) 0 0;
border-style: none;}
img.next{width:40px;
height:32px;background:url(share.png) -36px 0;
border-style:none;}
</style>
<a href="http://www.yahoo.com/">
<img class="home" border="0">
</a>
<img class="next" border="0"/>
Run Code Online (Sandbox Code Playgroud)

的jsfiddle

html css

4
推荐指数
1
解决办法
2027
查看次数

php中的echo和return之间的区别?

这让我很困惑,函数中echo和return之间有什么区别

php

3
推荐指数
2
解决办法
9586
查看次数

如何在刷新页面时停止"Conform form resubmission"对话框

我使用订阅脚本将用户电子邮件地址添加到mysql记录.我使用下面的代码进行此过程.工作正常.用户提交电子邮件后页面刷新,数据库也更新为mysql :-).但问题是,当我在提交电子邮件后刷新页面时,我正在获得一个符合表格的重新提交对话框.如果我点击继续按钮,同一个电子邮件(dublicate)正在更新新记录.我的数据库正在使用相同的电子邮件地址进行更新当我刷新页面.如何禁用此消息并停止更新mysql中的相同重复记录.

<form id="myForm" action="" onsubmit="return validateForm();"method="post">
    <input type="hidden" name="action" value="update" />
    <input type="text" name="email" id="email" value="Enter your email here" onfocus="if (this.value == 'Enter your email here') {this.value = '';}" onblur="if   (this.value == '') {this.value = 'Enter your email here';}" onwebkitspeechchange = "this.value = this.value.replace('Enter your email here','')" style=" margin:0px 0px 0px 26px;color:#999; border:4px solid #bbb;border-radius:6px;font-size:1em;width:260px;height:30px; font-style:italic; font-family:"Times New  Roman", Times, serif;"/>
    <br>
    <center>
        <input class="button" type="image" src="rss.png" />
    </center>
</form>
<?php
    $email = $_POST['email'];
    mysql_connect ("localhost", "root", "") or …
Run Code Online (Sandbox Code Playgroud)

javascript php mysql

3
推荐指数
1
解决办法
992
查看次数

使用CSS裁剪和平铺背景图像

我有一个CSS精灵图像,footer1.png.我想使用CSS来裁剪图像的一部分,然后将图像平铺为我的.headimg3元素的背景.

我正在尝试使用clipbackground属性来实现这一点,但图像不会被裁剪.

.headimg3 {
  background: url(footer1.png) bottom;
  background-position: -35px -358px;
  background-repeat: repeat;
  height:34px;
  overflow: hidden; 
  clip: rect(0px, 200px, 0px, 400px); 
}
.headimgp {
  padding: 8px 0px 0px 10px;
  text-shadow: 2px 1px #fff;
}
Run Code Online (Sandbox Code Playgroud)
<div class="headimg3">
  <div class="headimgp">
    &nbsp; LATEST Updates
  </div>
</div>
Run Code Online (Sandbox Code Playgroud)

如何仅使用CSS裁剪和平铺背景图像?

css css-sprites

3
推荐指数
1
解决办法
6431
查看次数

标签 统计

css ×3

php ×2

css-sprites ×1

html ×1

javascript ×1

mysql ×1