我正在创建一个销售乐器的 * 产品登陆网页 *...现在,我希望我的页面显示一个按钮来显示更多内容。但在我的情况下,页面不仅有文本。我想添加一个完整的div标签来显示更多内容。我阅读了各种文章,但它们只适用于文本。
#product-info {
margin-top: 10px;
font-family: 'Cinzel', serif;
background: linear-gradient(0deg,
rgba(123,67,151,1) 0%,
rgba(220,36,48,1) 100%);
align-items: center;
height: 220rem;
padding-top: 100px;
}
/* FOR GUITAR */
#guitarbox {
display: flex;
float: right;
justify-content: center;
margin: 40px;
border-radius: 20px;
background-color: rgb(237, 244, 199);
transition: 1s;
border-radius: 20px;
}
#guitarbox:hover {
background-color: #bebebe;
}
#guitarcontent {
margin: 30px;
padding-top: 20px;
}
#guitarbox img {
border-radius: 0px 20px 20px 0px;
}
/* GUITAR END */
/* FOR KEYBOARD */
#keyboardbox {
display: flex;
float: right;
justify-content: center;
margin: 40px;
border-radius: 20px;
background-color: rgb(237, 244, 199);
transition: 1s;
border-radius: 20px;
}
#keyboardcontent {
margin: 30px;
padding-top: 20px;
}
#keyboardbox:hover {
background-color: #bebebe;
}
#keyboardbox img {
border-radius: 0px 20px 20px 0px;
}
/* KEYBOARD END */
/* FOR VIOLIN */
#violinbox {
display: flex;
float: right;
justify-content: center;
margin: 40px;
border-radius: 20px;
background-color: rgb(237, 244, 199);
transition: 1s;
border-radius: 20px;
}
#violinbox:hover {
background-color: #bebebe;
}
#violincontent {
margin: 30px;
padding-top: 20px;
}
#violinbox img {
margin-right: 0;
border-radius: 0px 20px 20px 0px;
}
/* VIOLIN END */
/* FOR CELLO */
#cellobox {
display: flex;
float: right;
justify-content: center;
margin: 40px;
border-radius: 20px;
background-color: rgb(237, 244, 199);
transition: 1s;
border-radius: 20px;
}
#cellobox:hover {
background-color: #bebebe;
}
#cellocontent {
margin: 30px;
padding-top: 20px;
}
#cellobox img {
border-radius: 0px 20px 20px 0px;
}
/* CELLO END */
<section id="product-info" class="product-info">
<b>Here are the instruments that our brand serves: </b>
<div class="guitar">
<div id="guitarbox">
<div id="guitarcontent">
<h1>Guitar</h1><hr>
<p>
An electric guitar is a guitar that requires
external amplification in order to be heard at
typical performance volumes, unlike a standard
acoustic guitar. It uses one or more pickups to
convert the vibration of its strings into
electrical signals, which ultimately are
reproduced as sound by loudspeakers.
</p>
</div>
<div id="guitarimg">
<a href="https://en.wikipedia.org/wiki/Electric_guitar" target="_blank">
<img src="/images/electric-guitar.jpg" width="500px">
</a>
</div>
</div>
</div>
<div class="keyboard">
<div id="keyboardbox">
<div id="keyboardcontent">
<h1>Keyboard</h1><hr>
<p>
A musical keyboard is the set of adjacent depressible
levers or keys on a musical instrument.
Keyboards typically contain keys for playing the
twelve notes of the Western musical scale, with a
combination of larger, longer keys and smaller,
shorter keys that repeats at the interval of an octave.
</p>
</div>
<div id="keyboardimg">
<a href="https://en.wikipedia.org/wiki/Musical_keyboard" target="_blank">
<img src="/images/keyboard2.png" width="500px">
</a>
</div>
</div>
</div>
<div class="violin">
<div id="violinbox">
<div id="violincontent">
<h1>Violin</h1><hr>
<p>
The violin, sometimes known as a fiddle, is a
wooden chordophone (string instrument) in the
violin family. Most violins have a hollow wooden
body. It is the smallest and thus highest-pitched
instrument (soprano) in the family in regular use.
</p>
</div>
<div id="violinimg">
<a href="https://en.wikipedia.org/wiki/Violin" target="_blank">
<img src="/images/violin.jpg" width="500px">
</a>
</div>
</div>
</div>
<div class="cello">
<div id="cellobox">
<div id="cellocontent">
<h1>Cello</h1><hr>
<p>
The cello (/ˈtʃɛloʊ/ CHEL-oh; plural celli or
cellos) or violoncello (/ˌvaɪələnˈtʃɛloʊ/ VY-ə-lən-CHEL-oh;
Italian pronunciation: [vjolonˈtʃɛllo]) is a
bowed (sometimes plucked and occasionally hit)
string instrument of the violin family.
</p>
</div>
<div id="celloimg">
<a href="https://en.wikipedia.org/wiki/Musical_keyboard" target="_blank">
<img src="/images/cello2.jpeg" width="500px">
</a>
</div>
</div>
</div>
</section>
在这里,我希望div下面的键盘是在显示更多...
我试着参考各种网站,但找不到解决方案:(
1条答案
按热度按时间trnvg8h31#
@Alok Marathe.请检查下面的代码为您的问题.有很多关于堆栈溢出的代码,为您提供了如何显示更多功能的想法.
他们会给予你的例子与工作,你需要只是实现这一点。
这里是堆栈溢出链接,你的代码在下面。
stack-overflow