⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c++builder调用matlab - 编程文档 .mht

📁 C++Builder与Matlab7_1混合编程环境设置.
💻 MHT
📖 第 1 页 / 共 5 页
字号:
Content-Location: http://www.ccrun.com/!sys/niftycube.js

/* Nifty Corners Cube - rounded corners with CSS and Javascript
Copyright 2006 Alessandro Fulciniti (a.fulciniti@html.it)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  =
USA
*/

var niftyOk=3D(document.getElementById && document.createElement && =
Array.prototype.push);
var niftyCss=3Dfalse;

String.prototype.find=3Dfunction(what){
return(this.indexOf(what)>=3D0 ? true : false);
}

var oldonload=3Dwindow.onload;
if(typeof(NiftyLoad)!=3D'function') NiftyLoad=3Dfunction(){};
if(typeof(oldonload)=3D=3D'function')
    window.onload=3Dfunction(){oldonload();AddCss();NiftyLoad()};
else window.onload=3Dfunction(){AddCss();NiftyLoad()};

function AddCss(){
niftyCss=3Dtrue;
var l=3DCreateEl("link");
l.setAttribute("type","text/css");
l.setAttribute("rel","stylesheet");
l.setAttribute("href","niftycorners.css");
l.setAttribute("media","screen");
document.getElementsByTagName("head")[0].appendChild(l);
}

function Nifty(selector,options){
if(niftyOk=3D=3Dfalse) return;
if(niftyCss=3D=3Dfalse) AddCss();
var i,v=3Dselector.split(","),h=3D0;
if(options=3D=3Dnull) options=3D"";
if(options.find("fixed-height"))
    h=3DgetElementsBySelector(v[0])[0].offsetHeight;
for(i=3D0;i<v.length;i++)
    Rounded(v[i],options);
if(options.find("height")) SameHeight(selector,h);
}

function Rounded(selector,options){
var i,top=3D"",bottom=3D"",v=3Dnew Array();
if(options!=3D""){
    options=3Doptions.replace("left","tl bl");
    options=3Doptions.replace("right","tr br");
    options=3Doptions.replace("top","tr tl");
    options=3Doptions.replace("bottom","br bl");
    options=3Doptions.replace("transparent","alias");
    if(options.find("tl")){
        top=3D"both";
        if(!options.find("tr")) top=3D"left";
        }
    else if(options.find("tr")) top=3D"right";
    if(options.find("bl")){
        bottom=3D"both";
        if(!options.find("br")) bottom=3D"left";
        }
    else if(options.find("br")) bottom=3D"right";
    }
if(top=3D=3D"" && bottom=3D=3D"" && =
!options.find("none")){top=3D"both";bottom=3D"both";}
v=3DgetElementsBySelector(selector);
for(i=3D0;i<v.length;i++){
    FixIE(v[i]);
    if(top!=3D"") AddTop(v[i],top,options);
    if(bottom!=3D"") AddBottom(v[i],bottom,options);
    }
}

function AddTop(el,side,options){
var d=3DCreateEl("b"),lim=3D4,border=3D"",p,i,btype=3D"r",bk,color;
d.style.marginLeft=3D"-"+getPadding(el,"Left")+"px";
d.style.marginRight=3D"-"+getPadding(el,"Right")+"px";
if(options.find("alias") || (color=3DgetBk(el))=3D=3D"transparent"){
    color=3D"transparent";bk=3D"transparent"; =
border=3DgetParentBk(el);btype=3D"t";
    }
else{
    bk=3DgetParentBk(el); border=3DMix(color,bk);
    }
d.style.background=3Dbk;
d.className=3D"niftycorners";
p=3DgetPadding(el,"Top");
if(options.find("small")){
    d.style.marginBottom=3D(p-2)+"px";
    btype+=3D"s"; lim=3D2;
    }
else if(options.find("big")){
    d.style.marginBottom=3D(p-10)+"px";
    btype+=3D"b"; lim=3D8;
    }
else d.style.marginBottom=3D(p-5)+"px";
for(i=3D1;i<=3Dlim;i++)
    d.appendChild(CreateStrip(i,side,color,border,btype));
el.style.paddingTop=3D"0";
el.insertBefore(d,el.firstChild);
}

function AddBottom(el,side,options){
var d=3DCreateEl("b"),lim=3D4,border=3D"",p,i,btype=3D"r",bk,color;
d.style.marginLeft=3D"-"+getPadding(el,"Left")+"px";
d.style.marginRight=3D"-"+getPadding(el,"Right")+"px";
if(options.find("alias") || (color=3DgetBk(el))=3D=3D"transparent"){
    color=3D"transparent";bk=3D"transparent"; =
border=3DgetParentBk(el);btype=3D"t";
    }
else{
    bk=3DgetParentBk(el); border=3DMix(color,bk);
    }
d.style.background=3Dbk;
d.className=3D"niftycorners";
p=3DgetPadding(el,"Bottom");
if(options.find("small")){
    d.style.marginTop=3D(p-2)+"px";
    btype+=3D"s"; lim=3D2;
    }
else if(options.find("big")){
    d.style.marginTop=3D(p-10)+"px";
    btype+=3D"b"; lim=3D8;
    }
else d.style.marginTop=3D(p-5)+"px";
for(i=3Dlim;i>0;i--)
    d.appendChild(CreateStrip(i,side,color,border,btype));
el.style.paddingBottom=3D0;
el.appendChild(d);
}

function CreateStrip(index,side,color,border,btype){
var x=3DCreateEl("b");
x.className=3Dbtype+index;
x.style.backgroundColor=3Dcolor;
x.style.borderColor=3Dborder;
if(side=3D=3D"left"){
    x.style.borderRightWidth=3D"0";
    x.style.marginRight=3D"0";
    }
else if(side=3D=3D"right"){
    x.style.borderLeftWidth=3D"0";
    x.style.marginLeft=3D"0";
    }
return(x);
}

function CreateEl(x){
return(document.createElement(x));
}

function FixIE(el){
if(el.currentStyle!=3Dnull && el.currentStyle.hasLayout!=3Dnull && =
el.currentStyle.hasLayout=3D=3Dfalse)
    el.style.display=3D"inline-block";
}

function SameHeight(selector,maxh){
var i,v=3Dselector.split(","),t,j,els=3D[],gap;
for(i=3D0;i<v.length;i++){
    t=3DgetElementsBySelector(v[i]);
    els=3Dels.concat(t);
    }
for(i=3D0;i<els.length;i++){
    if(els[i].offsetHeight>maxh) maxh=3Dels[i].offsetHeight;
    els[i].style.height=3D"auto";
    }
for(i=3D0;i<els.length;i++){
    gap=3Dmaxh-els[i].offsetHeight;
    if(gap>0){
        =
t=3DCreateEl("b");t.className=3D"niftyfill";t.style.height=3Dgap+"px";
        nc=3Dels[i].lastChild;
        if(nc.className=3D=3D"niftycorners")
            els[i].insertBefore(t,nc);
        else els[i].appendChild(t);
        }
    }
}

function getElementsBySelector(selector){
var =
i,j,selid=3D"",selclass=3D"",tag=3Dselector,tag2=3D"",v2,k,f,a,s=3D[],obj=
list=3D[],c;
if(selector.find("#")){ //id selector like "tag#id"
    if(selector.find(" ")){  //descendant selector like "tag#id tag"
        s=3Dselector.split(" ");
        var fs=3Ds[0].split("#");
        if(fs.length=3D=3D1) return(objlist);
        f=3Ddocument.getElementById(fs[1]);
        if(f){
            v=3Df.getElementsByTagName(s[1]);
            for(i=3D0;i<v.length;i++) objlist.push(v[i]);
            }
        return(objlist);
        }
    else{
        s=3Dselector.split("#");
        tag=3Ds[0];
        selid=3Ds[1];
        if(selid!=3D""){
            f=3Ddocument.getElementById(selid);
            if(f) objlist.push(f);
            return(objlist);
            }
        }
    }
if(selector.find(".")){      //class selector like "tag.class"
    s=3Dselector.split(".");
    tag=3Ds[0];
    selclass=3Ds[1];
    if(selclass.find(" ")){   //descendant selector like tag1.classname =
tag2
        s=3Dselclass.split(" ");
        selclass=3Ds[0];
        tag2=3Ds[1];
        }
    }
var v=3Ddocument.getElementsByTagName(tag);  // tag selector like "tag"
if(selclass=3D=3D""){
    for(i=3D0;i<v.length;i++) objlist.push(v[i]);
    return(objlist);
    }
for(i=3D0;i<v.length;i++){
    c=3Dv[i].className.split(" ");
    for(j=3D0;j<c.length;j++){
        if(c[j]=3D=3Dselclass){
            if(tag2=3D=3D"") objlist.push(v[i]);
            else{
                v2=3Dv[i].getElementsByTagName(tag2);
                for(k=3D0;k<v2.length;k++) objlist.push(v2[k]);
                }
            }
        }
    }
return(objlist);
}

function getParentBk(x){
var el=3Dx.parentNode,c;
while(el.tagName.toUpperCase()!=3D"HTML" && =
(c=3DgetBk(el))=3D=3D"transparent")
    el=3Del.parentNode;
if(c=3D=3D"transparent") c=3D"#FFFFFF";
return(c);
}

function getBk(x){
var c=3DgetStyleProp(x,"backgroundColor");
if(c=3D=3Dnull || c=3D=3D"transparent" || c.find("rgba(0, 0, 0, 0)")

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -