html和css还有图片怎么上传到服务器里面

html-css018

html和css还有图片怎么上传到服务器里面,第1张

所有文件都是上传到web目录里的,它是网站的根目录。log目录和data目录是系统的保留目录,网站是不能直接链接到这两个目录的,它们也是不占用你的网站空间的。log目录用来存放运行日志(服务器自动生成),data目录则通常用来存放文件型数据库(如ACCESS),调用的时候要用物理路径而不是超链接,这样做的好处是使数据库不占用网站空间,如果你用的不是ACCESS数据库(比如MsSQL数据库),那么这个data目录可以忽略。

补充说明一下:FTP的根目录与网站的根目录通常是不同的(但也有服务器是设为同一目录的),比如你的服务器,用FTP进入是可以看到图中的三个文件夹,但当你在浏览器中用域名访问你的网站时,它是直接打开web文件夹中的内容的,也就是说web文件夹才是你网站的根目录!

1.可以利用css的定位元素来实现。

<style>

.btn{position: relativeoverflow: hiddenmargin-right: 4pxdisplay:inline-block*display:inlinepadding:4px 10px 4pxfont-size:14pxline-height:18px*line-height:20pxcolor:#ffftext-align:centervertical-align:middlecursor:pointerbackground-color:#5bb75bborder:1px solid #ccccccborder-color:#e6e6e6 #e6e6e6 #bfbfbfborder-bottom-color:#b3b3b3-webkit-border-radius:4px-moz-border-radius:4pxborder-radius:4px}

.btn input {position: absolutetop: 0 right: 0margin: 0border: solid transparentopacity: 0filter:alpha(opacity=0) cursor: pointer}

</style>

<div id="up_btn" class="btn">

<span>添加图片</span>

<input id="photoimg" type="file" name="photoimg">

</div>