1 [Code] Làm thẻ div có thanh cuộn (scrollbar) giống iFrame Sun Nov 11, 2012 9:04 pm
Admin
Trùm Forum
Nguồn : [You must be registered and logged in to see this link.]
Chèn đoạn mã này vào homepage message hay bất cứ nơi đâu cho phép html
Chèn đoạn mã này vào homepage message hay bất cứ nơi đâu cho phép html
- Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://[url=http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd%22%3E]www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">[/url]
<html xmlns="http://[url=http://www.w3.org/1999/xhtml%22]www.w3.org/1999/xhtml"[/url] xml:lang="en" lang="en">
<head>
<title>example page</title>
</head>
<body>
<div id="page">
<h1>Title</h1>
<div id="scroll_box">
<p>
Put a long text in here. It will be crollable.<br/>
Put a long text in here. It will be crollable.<br/>
Put a long text in here. It will be crollable.<br/>
Put a long text in here. It will be crollable.<br/>
Put a long text in here. It will be crollable.<br/>
Put a long text in here. It will be crollable.<br/>
Put a long text in here. It will be crollable.<br/>
</p>
</div>
<p>
This content follows after the scrollable box.
</p>
</div>
</body>
</html>
- Code:
#scroll_box {
height: 120px;
width: 400px;
display: auto;
border: 1px solid #CCCCCC;
margin: 1em 0;
}