]; 5. Texture [ ]; 5. Texture [
search
HomeWeb Front-endHTML TutorialWhat are the special effects codes for html web pages?

What are the special effects codes for html web pages?

Mar 16, 2021 pm 03:19 PM
htmlWeb special effects

html Web page special effects codes include: 1. Bold font [xx]; 2. Italic font [xx]; 3. Font size control [

xx

]; 4. Change the post background []; 5. Texture [What are the special effects codes for html web pages?

What are the special effects codes for html web pages?

The operating environment of this tutorial: windows7 system, html5 version, DELL G3 computer.

html web page special effects codes are:

1) Texture:

<img  src="/static/imghwm/default1.png"  data-src="图片地址"  class="lazy"   alt="What are the special effects codes for html web pages?" >

2) Join the link:

<a href="所要连接的相关地址">写上你想写的字</a>

3) In Open the connection in a new window:

<a href="相关地址" target="_blank">写上要写的字</a>

Remove the underline of the connection and open the connection in a new window:

<a href="相关地址"   style="max-width:90%" target="_blank">写上你想写的字</a>

4) Move the font (marquee):

<marquee>写上你想写的字</marquee>

5) Make the font bold:

<b>写上你想写的字</b>

6) Font italics:

<i>写上你想写的字</i>

7) Font underline:

<u>写上你想写的字</u>

8) Font strikethrough:

<s>写上你想写的字</s>

9) Font enlargement:

<big>写上你想写的字</big>

10) Font control size:

<h1 id="写上你想写的字">写上你想写的字</h1>

(The font size can be from h1-h5, h1 is the largest, h5 is the smallest) <br>

11) Change the font color :

<font color="#value">写上你想写的字</font>

(The value is between 000000 and ffffff (16-digit)<br>

12) Remove the connecting underline:

<a href="相关地址" style="text-decoration:none">写上你想写的字</a>

13) Post Music:

<embed src=音乐地址 width=300 height=45 type=audio/mpeg autostart="false">

14) Post flash:

<embed src="flash地址" width="宽度" height="高度">

15) Post video files:

<img  src="/static/imghwm/default1.png"  data-src="文件地址"  class="lazy"  dyn    style="max-width:90%" height="高度" start=mouseover alt="What are the special effects codes for html web pages?" >

16) Line break: <br>

17) Paragraph:

<p>段落</p>

18) Original text style:

<pre class="brush:php;toolbar:false">正文

19) Change post background:

<body background="背景图片地址">

20) Fixed post background not scrolling with the scroll bar :

<body background="背景图片地址" body bgproperties=fixed>

21) Customize post background color:

(see value 10)

22) Post background music:

23) Post the web page:

HTML special effects code 1. Ignore the right click

  <body oncontextmenu="return false">

or

 <body style="overflow-y:hidden">

2. Add background music

  IE:<bgsound src="*.mid" loop=infinite> 
  NS:<embed src="*.mid" autostart=true hidden=true loop=true> 
  </embed> 
  *.mid你的背景音乐的midi格式文件

3. Simple window.open method

  <a href="#" 
  onclick="javascript :window.open(文件路径/文件名,newwindow, 
  toolbar=no,scrollbars=yes,resizable=no,top=0,left=0, 
  width=400,height=300);">文字或图片</a>

Parameter explanation:

  • window.open command to pop up a new window;

  • File path/file name The file name of the pop-up window;

  • Newwindow The name of the pop-up window (not the file name), optional, can be replaced by blank;

  • width=400 window width;

  • height=300 window height;

  • top=0 window distance Pixel value at the top of the screen;

  • left=0 Pixel value from the left side of the screen from the window;

  • toolbar=no Whether to display the tool bar, yes means display;

  • menubar, scrollbars represent menu bar and scroll bar.

  • resizable=no Whether to allow changing the window size, yes is allowed;

  • location=no Whether to display the address bar, yes is allowed;

  • Status=no Whether to display the information in the status bar (usually the file has been opened), yes is allowed;

  • End of js script

4. Simple page encryption

  <script LANGUAGE="javascript"> 
  <!-- 
  function loopy(){ 
   var sWord =""; 
   while(sWord!="login"){sWord=prompt("请输入你的登陆密码");} 
   alert("登陆成功!"); 
  } 
  loopy() 
  //--> 
  </script>

5. The background image does not move when the page is pulled

  <style> 
  body{background-image:url(logo.gif); 
  background-repeat:no-repeat;background-position:center} 
  </style>

6. Let the browser Failed to save when saving the page

  <NOSCRIPT><iframe src="*.html"></iframe></NOSCRIPT>

7. Randomly replace pictures

  <script> 
  document.write(<img  src="/static/imghwm/default1.png"  data-src="iframe.htm"  class="lazy"     style="max-width:90%"  style="max-width:90%" alt="What are the special effects codes for html web pages?" > 
  </script>

The picture file name is 0.gif 1.gif 2.gif 3.gif 4.gif

8 . The window is closed regularly

First add the following code to the area of ​​the web page file:

  <script language="javascript"> 
  function closeit() { setTimeout("self.close()",10000) //毫秒 } 
  </script>

Then add within the

tag such as:

9. The webpage automatically closes

  <html> 
  <head> 
  <object id=closes type="application/x-oleobject" 
  classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> 
  <param name="Command" value="Close"> 
  </object> 
  </head> 
  <body onload="window.setTimeout(closes.Click(),10000)"> 
  这个窗口会在10秒过后自动关闭,而且不会出现提示. 
  </body> 
  </html>

10. The webpage automatically refreshes

Enter

  <META HTTP-EQUIV="Refresh" content="20">

in the head section, where 20 means automatic refresh after 20 seconds. You can change it to any value.

11. Automatic page rotation

  <META HTTP-EQUIV="Refresh" CONTENT="时间(秒);URL=地址">

12. Keep layer at the front and not covered by Iframe or Object

Insert Iframe or Object settings in Layer z-Index value

  <div z-Index:2><object xxx></object> # 前面 
  <div z-Index:1><object xxx></object> # 后面 
  <div id="Layer2" style="position:absolute; top:40;width:400px; 
  height:95px;z-index:2"> height=100% width=100%> 
  <iframe width=0 height=0></iframe> 
  </div> 
  <div id="Layer1" style="position:absolute; top:50;width:200px; 
  height:115px;z-index:1"> 
  <iframe height=100% width=100%></iframe> 
  </div>

13. Return to the previous page

 <a href=javascript :history.back(1)>『返回上一页』</a>

14. Close the window

  <a href=javascript :self.close()>『关闭窗口』</a>

15. About the transparent background of iframe

  <IFRAME ID="iFrame1"  
  allowTransparency="true" 
  style="</IFRAME>

16 . oncontextmenu="window.event.returnValue=false" will completely block the right mouse button

    <table border oncontextmenu=return(false)><td>no</table>

Can be used in Table <br>

17.

<body onselectstart="return false">

Cancel selection and prevent copying <br>

18.

onpaste="return false"

No pasting <br>

19.

oncopy="return false;" oncut="return false;"

Prevent copying<br>

Related learning recommendations: html tutorial

The above is the detailed content of What are the special effects codes for html web pages?. For more information, please follow other related articles on the PHP Chinese website!

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
HTML `tabindex` for Keyboard NavigationHTML `tabindex` for Keyboard NavigationJul 23, 2025 am 02:59 AM

tabindex is an attribute in HTML that controls whether elements can be focused and sequenced through the keyboard Tab key. There are three common values: tabindex="0" makes the elements focusable and follow the natural order, tabindex="-1" allows focus through JavaScript but not in the Tab sequence, tabindex="1" or higher forces the order to change but is not recommended. The rational use of tabindex requires priority to use semantic tags, avoid abuse of high numerical values, combine ARIA attributes, and test keyboard navigation. Notes include ensuring that elements are not disabled or hidden, considering browser differences, providing: focus

The `details` Element for Expandable ContentThe `details` Element for Expandable ContentJul 23, 2025 am 02:57 AM

Using HTML tags to achieve expandable content without JavaScript, it is suitable for scenarios such as FAQ, help prompts, and settings panels. 1. The basic usage is to use tags as the trigger title; 2. Closed by default, add open attributes to expand by default; 3. Custom styles can be customized through CSS to match the design style; 4. Pay attention to maintaining interactive feedback to improve user experience; 5. Although the accessibility support is good, compatibility issues of old devices still need to be considered.

Building HTML Dashboards with DataBuilding HTML Dashboards with DataJul 23, 2025 am 02:50 AM

The reason why you choose an HTML dashboard when displaying data is that it is simple and practical. First, determine the data source, such as CSV, Excel, database or API, and the front-end can be processed in JSON format; second, use chart libraries such as Chart.js to achieve visualization, such as drawing a bar chart with canvas; then use CSSGrid or Flexbox to layout and add responsive design; finally pay attention to issues such as loading order and data format to ensure the display effect.

Implementing File Uploads in HTML FormsImplementing File Uploads in HTML FormsJul 23, 2025 am 02:48 AM

The key points of implementing file upload function include the use of add controls, setting enctype attributes, back-end reception and security processing, and compatibility optimization. 1. Use and configure accept, multiple, capture and other attributes in HTML to improve the experience; 2. Enctype="multipart/form-data" must be set in the form to ensure the correct data parsing; 3. The backend selects corresponding solutions according to the language such as PHP's $\_FILES, Node.js's multer, and Python's request.files; 4. The file type, limit size, and rename files to ensure security; 5. Pay attention to common problems such as not

HTML `form` `enctype` Attribute for File UploadsHTML `form` `enctype` Attribute for File UploadsJul 23, 2025 am 02:35 AM

ToenablefileuploadsinHTMLforms,settheenctypeattributeto"multipart/form-data".Thisencodingallowsbinarydatatransmissionandisessentialforfileuploads.UseitwithaPOSTmethodintheformtag.Withoutthissetting,theservercannotproperlyreceivefiles.Common

Creating Clickable Image Maps in HTMLCreating Clickable Image Maps in HTMLJul 23, 2025 am 02:35 AM

If you want to click on different image areas to jump to different links on a web page, you can use HTML imagemap. The specific operation is to combine the tag with the usemap attribute, and then define the clickable area with the tag. 1. Use the corresponding map to specify; 2. Use multiple areas to define different shapes in it; 3. Set shape and coords attributes for each, specifying shapes and coordinates respectively. The format of coords varies according to the shape: the rectangle is x1, y1, x2, y2, the circle is cx, cy, r, and the polygon is the coordinates of multiple points arranged in sequence. It is recommended to use an image editing tool or an online generator to get coordinate values. Notes include: Make sure that mapname corresponds to usemap and is responsive.

The HTML `abbr` Tag for Tooltips and AccessibilityThe HTML `abbr` Tag for Tooltips and AccessibilityJul 23, 2025 am 02:29 AM

TheHTML<abbr>tagisidealforaddingtooltipsandimprovingaccessibilityforabbreviations.1.Itdisplaystooltipsbydefaultwhenatitleattributeisincluded.2.Screenreadersannouncethefullexplanationofabbreviations,enhancingaccessibility.3.Itisbestusedf

Building HTML Sitemaps for SEOBuilding HTML Sitemaps for SEOJul 23, 2025 am 02:26 AM

HTML sitemap is helpful for SEO, which indirectly supports SEO by improving crawling efficiency, optimizing user experience and assisting internal link building. Its main function is to provide users with a clearly structured content index page, making it easier for search engines to discover internal pages of the website. The steps to build an HTML sitemap include: classifying by topic or column, avoiding too many links, using a concise list format, and keeping updates. Not all websites require HTML site maps, but it is recommended to add them for large content, complex structure or e-commerce websites.

See all articles

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment