導航:首頁 > 編程語言 > 網站相冊代碼

網站相冊代碼

發布時間:2024-08-08 16:39:15

㈠ html旋轉相冊代碼

旋轉index文件代碼:




3D旋轉相冊

*{
padding:0;
margin:0;
}
body,
html{
height:100%;
}
/*背景圖片在這里設置*/
body{
background-image:url("images/beijing.jpg");
background-size:100%100%;
}
#box{
width:280px;
height:400px;
position:fixed;
left:0;
right:0;
top:0;
bottom:0;
margin:auto;
transform-style:preserve-3d;
transform:rotateX(0deg)rotateY(0deg);
animation:go45slinearinfinite;
}
#boximg{
width:280px;
height:400px;
position:absolute;
left:0;
top:0;
}
#boximg:nth-child(1){
transform:rotateY(0deg)translateZ(650px);
}
#boximg:nth-child(2){
transform:rotateY(36deg)translateZ(650px);
}
#boximg:nth-child(3){
transform:rotateY(72deg)translateZ(650px);
}
#boximg:nth-child(4){
transform:rotateY(108deg)translateZ(650px);
}
#boximg:nth-child(5){
transform:rotateY(144deg)translateZ(650px);
}
#boximg:nth-child(6){
transform:rotateY(180deg)translateZ(650px);
}
#boximg:nth-child(7){
transform:rotateY(216deg)translateZ(650px);
}
#boximg:nth-child(8){
transform:rotateY(252deg)translateZ(650px);
}
#boximg:nth-child(9){
transform:rotateY(288deg)translateZ(650px);
}
#boximg:nth-child(10){
transform:rotateY(324deg)translateZ(650px);
}
@keyframesgo{
0%{
transform:rotateX(0deg)rotateY(0deg);
}
25%{
transform:rotateX(20deg)rotateY(180deg);
}
50%{
transform:rotateX(0deg)rotateY(360deg);
}
75%{
transform:rotateX(-20deg)rotateY(540deg);
}
100%{
transform:rotateX(0deg)rotateY(720deg);
}
}














㈡ 求JAVA電子相冊代碼

頁面:
<%@ Page language="c#" Codebehind="filesystem.aspx.cs" AutoEventWireup="false" Inherits="WebShop.filesystem" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>filesystem</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="" name="vs_targetSchema">
<LINK href="CssStyle.css" type="text/css" rel="stylesheet">
<form id="Form1" method="post" runat="server">
</HEAD>
<body MS_POSITIONING="GridLayout">
<FONT face="宋體">
<table cellSpacing="1" cellPadding="0" width="777" align="center" bgColor="#336600" border="0">
<tr>
<td bgColor="#08498c" colSpan="3"><IMG src="images/FileSystemBaner.gif"></td>
</tr>
<tr>
<td width="170" bgColor="#e3e3e3" rowSpan="2">
<asp:linkbutton id="LinkButton1" runat="server">後退</asp:linkbutton></td>
<td width="604" bgColor="#efefef" colSpan="2">
<asp:datalist id="DataList1" runat="server" RepeatColumns="4" RepeatDirection="Horizontal" DataKeyField="Name"
Width="604">
<ItemTemplate>
<table width="150" align="center">
<tr>
<td align="center" width="10"></td>
<td align="left" width="140"><%#DataBinder.Eval(Container.DataItem,"Image")%>
</td>
</tr>
<tr>
<td width="10" align="right">
<asp:CheckBox ID="checkBox1" Runat="server" /></td>
<td width="140" align="left"><font face="宋體"><%#DataBinder.Eval(Container.DataItem,"Name")%></font></td>
</tr>
</table>
</ItemTemplate>
</asp:datalist></td>
</tr>
<tr>
<td align="right" bgColor="#efefef" colSpan="2"><asp:button id="Button3" runat="server" Text="刪除選中項"></asp:button>
<input id="fileFeild1" type="file" name="fileFeild1" runat="server">
<asp:button id="Button1" runat="server" Text="確定上傳"></asp:button><br>
<asp:textbox id="TextBox1" runat="server"></asp:textbox>
<asp:button id="Button2" runat="server" Text="創建目錄"></asp:button></td>
</tr>
<tr>
<td bgColor="#888888" colSpan="3"><span class="STYLE1"><asp:label id="Label2" runat="server" ForeColor="White"> 當前所在位置:</asp:label><SPAN class="STYLE1"><asp:label id="Label1" runat="server" ForeColor="White" Width="87px"></asp:label></SPAN></span></td>
</tr>
</table>
</FONT></FORM>
</body>
</HTML>

後台代碼:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.IO;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;

namespace WebShop
{
/// <summary>
/// filesystem 的摘要說明。
/// </summary>
public class filesystem : System.Web.UI.Page
{
protected System.Web.UI.WebControls.LinkButton LinkButton1;
protected System.Web.UI.WebControls.DataList DataList1;
protected System.Web.UI.WebControls.Button Button3;
protected System.Web.UI.WebControls.Button Button1;
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Button Button2;
protected System.Web.UI.WebControls.Label Label2;
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.HtmlControls.HtmlInputFile fileFeild1;

private void Page_Load(object sender, System.EventArgs e)
{
if(!IsPostBack)
{
Bind();
}
}

private void Bind()
{
string initpath="";
if(Request["path"]==null)
{
initpath=Server.MapPath("FileSystem");
}
else
{
initpath=Request["path"];
}
this.Label1.Text=initpath;

DataTable dt=new DataTable();
DataColumn dc0=new DataColumn("Image",System.Type.GetType("System.String"));
dt.Columns.Add(dc0);
DataColumn dc1=new DataColumn("Name",System.Type.GetType("System.String"));
dt.Columns.Add(dc1);

DirectoryInfo di=new DirectoryInfo(this.Label1.Text);
DirectoryInfo[] dis=di.GetDirectories();
foreach(DirectoryInfo d in dis)
{
DataRow dr=dt.NewRow();
dr[0]="<a href='filesystem.aspx?path="+HttpUtility.UrlEncode(d.FullName,System.Text.Encoding.UTF8)+"'><img src='images/folder.gif' border=0/></a>";
dr[1]=d.Name;
dt.Rows.Add(dr);
}

FileInfo[] fis=di.GetFiles();
foreach(FileInfo f in fis)
{
string ex=f.Extension.ToLower();
if(ex==".jpg" || ex==".jpeg" || ex==".gif" || ex==".png" || ex==".bmp")
{
string fullname=f.FullName;
string urlpath=fullname.Substring(fullname.IndexOf("FileSystem"));
string url=HttpUtility.UrlEncode(urlpath,System.Text.Encoding.UTF8);
DataRow dr=dt.NewRow();
dr[0]="<a href='"+url+"' target='_blank'><img src='"+url+"' border=0 width=100 height=128/></a>";
dr[1]=f.Name;
dt.Rows.Add(dr);
}
}

this.DataList1.DataSource=dt;
this.DataList1.DataBind();
}

#region Web 窗體設計器生成的代碼
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: 該調用是 ASP.NET Web 窗體設計器所必需的。
//
InitializeComponent();
base.OnInit(e);
}

/// <summary>
/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
/// 此方法的內容。
/// </summary>
private void InitializeComponent()
{
this.LinkButton1.Click += new System.EventHandler(this.LinkButton1_Click);
this.Button3.Click += new System.EventHandler(this.Button3_Click);
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Button2.Click += new System.EventHandler(this.Button2_Click);
this.Load += new System.EventHandler(this.Page_Load);

}
#endregion

private void LinkButton1_Click(object sender, System.EventArgs e)
{
string Parent=Directory.GetParent(this.Label1.Text).ToString();
if(Parent.IndexOf("FileSystem")>-1)
{
Response.Redirect("filesystem.aspx?path="+Parent);
}
else
{
return;
}
}

private void Button1_Click(object sender, System.EventArgs e)
{
HttpPostedFile hpf=this.fileFeild1.PostedFile;
string ClientPath=hpf.FileName;
string filename=Path.GetFileName(ClientPath);
string ex=Path.GetExtension(filename);
if(ex==".jpg" || ex==".jpeg" || ex==".gif" || ex==".png" || ex==".bmp")
{
string SavePath=this.Label1.Text+"\\"+filename;
hpf.SaveAs(SavePath);
Bind();
}
else
{
Response.Write(Tools.GetAlertJS("所上傳的圖片格式不正確!"));
return;
}
}

private void Button2_Click(object sender, System.EventArgs e)
{
string filename=this.TextBox1.Text;
Directory.CreateDirectory(this.Label1.Text+"\\"+filename);
Bind();
}

private void Button3_Click(object sender, System.EventArgs e)
{
for(int i=0;i<this.DataList1.Items.Count;i++)
{
if(((CheckBox)this.DataList1.Items[i].FindControl("CheckBox1")).Checked)
{
int index=this.DataList1.Items[i].ItemIndex;
string filePath=this.Label1.Text+"\\"+this.DataList1.DataKeys[index].ToString();
if(Directory.Exists(filePath))
{
Directory.Delete(filePath,true);
}
if(File.Exists(filePath))
{
File.Delete(filePath);
}
Bind();
}
}
}
}
}

這個是C#的 你改下 Java的就行

㈢ 一段網站相冊代碼,樣式是點擊小圖出現大圖,我想改成點進相冊第一張大圖是默認顯示出來的該如何讓改代碼

可以考慮直接在
for(var k=0; k<links.length; k++){
links[k].onclick = function(){
return showPic(this);

改成
for(var k=0; k<links.length; k++){
if(k==0)
showPic(links[0]);
links[k].onclick = function(){
return showPic(this);

改成這樣再試下

閱讀全文

與網站相冊代碼相關的資料

熱點內容
大量計算用什麼編程方式好 瀏覽:241
編程器刷微星bios刷哪個文件 瀏覽:111
選擇小米手機3版本 瀏覽:314
iphone鏈接 瀏覽:110
9元編程課是什麼 瀏覽:436
cad為什麼不能輸入stl文件 瀏覽:78
編程與外語哪個更好就業 瀏覽:299
為什麼程序會跑飛 瀏覽:659
matlab中的m文件是什麼 瀏覽:226
excel批量保存pdf文件 瀏覽:963
win10文件夾死機動不了 瀏覽:411
ps打開多頁pdf文件 瀏覽:901
資料庫統計某一欄位值出現次數 瀏覽:705
學編程需要哪些方面的能力 瀏覽:896
在word2003表格中插入一行 瀏覽:606
怎麼把拍照取字的文件轉成pdf 瀏覽:838
小米穿戴app哪裡更換表盤 瀏覽:911
滿足該條件更改文件內容的代碼 瀏覽:503
xp系統怎麼卸載win10系統文件 瀏覽:709
華為手機雙系統app怎麼轉 瀏覽:317

友情鏈接