Home >Web Front-end >JS Tutorial >Making windows tabs with htc components_Basic knowledge

Making windows tabs with htc components_Basic knowledge

WBOY
WBOYOriginal
2016-05-16 19:20:451161browse

There are many ways to simulate making Windows-style tabs on a web page. Here I will introduce you to a relatively simple method - making it with HTC components.​

The advantage of using htc is that it can be called freely, and it feels a bit like batch processing. For example, if you have many web pages that use this tab, then you only need to make one htc, and then use it in different web pages. Call them separately without having to make them again. It is very convenient to use and can save a lot of time.​

The specific production method is as follows:

1. Download mpc.htc

First go to the Microsoft website to download a component called mpc.htc, which is the raw material for making windows tabs.​

2. Edit the web page and call mpc.htc

1. Write the html tag as:
The following content is a quote:


2. Create style behavior:
The following content is a quote: ​ mpc:container,mpc:page{
Behavior:url(mpc.htc);
 }



That is, both mpc:container and mpc:page use behaviors to call mpc.htc


3. Specific content call:
The following content is a quote:



  ID="name"
TABTITLE="The content here will be prompted by the mouse"
TABTEXT="Here is the content of the tab label">
Here is the specific content of the tab  
 
 







Here in the tag, use the width and height of the style style to determine the width and height of the entire tab; then add the specific details of the tab between the ... tags Content, if there are several options, use several groups of ... tags.​
Attached is the code for the windows tab sample page in the article:
The following content is a quote:


mpc



      width:300; height:150; color:white">  
      
    
这是一个表格
       
This is a table

 

 
 

Please write text here...
 

 

 
 Making windows tabs with htc components_Basic knowledge
 

 
 Hyperlink
 







http://msdn.microsoft.com/downloads/samples/internet/behaviors/library/mpc/mpc.htc

Put the htc file in the same directory as the htm file where your tab is located, or change the location of htc in the page source code below

                   mpc:container                     
behavior:url(mpc.htc);
                                                              

               mpc:page                  
behavior:url(mpc.htc);
                                                                          

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn