为了账号安全,请及时绑定邮箱和手机立即绑定

关于图片的问题

<html>

<head>

<style type="text/css">

*{padding:0px;margin:0px}

body{background-color:#19da9e}

.aa{width:1700px;height:890px;background:yellow;margin:0 auto;position:relative;}

.tu{width:60px;height:40px;float:left;background:red;}

.ff1{width:200px;height:40px;line-height:40px;background:#ffffff;outline:none;float:left;}

.ff2{width:50px;height:40px;float:left;}

.qq{width:320px;height:42px;position:absolute;top:300px;left:200px}

</style>

</head>

<body>

<div class="aa">

<div class="qq">

<div class="tu"></div>

<from>

<input type="text" class="ff1"/>

<input type="submit" class="ff2" value=""/>

</from>

</div>

</div>

</body>

</html>

求教下大神一个问题。先谢谢大家了。为啥我每次url图片的位置 。电脑显示不出来啊

https://img1.sycdn.imooc.com//5b61d3ff000159b803690128.jpg

我用了url给DIV的tu用了.tu{width:60px;height:40px;float:left;background:url(1.jpg);}为什么没有了,电脑显示不出来是什么原因啊。。。很急求大神指点。 麻烦了

正在回答

1 回答

background-position:  px  px;

加上这个试试,第一个px是x轴距离,第二个是y轴距离。这个可以控制背景区域,显示图片的哪个部分。


0 回复 有任何疑惑可以回复我~
#1

qq_月亮比太阳大_0 提问者

还是没有用 还是 显示不了
2018-08-03 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
搜索框制作
  • 参与学习       66003    人
  • 解答问题       463    个

本课程从简入深讲解搜索框的制作,学习JQ与JS实现Ajax技术的不同点

进入课程

关于图片的问题

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号