如何使用css使我的电话号码变粗

时间:2016-07-26 10:04:53

标签: html css

我是初学者,我正在尝试使用css加粗此联系信息中列出的电话号码。任何人都能指出我使用的正确方向吗? 感谢您的帮助。



<div id="contact_info">
	<h3><a id="contact">Contact</a></h3>
	<p>If you are interested in chatting or want more information on what I have been working on, I'd  love to hear from you!</p>
	<p>Phone: 0064 1122334455</p>
	<p>Email: tracyexcell@email.com</p>
</div>
&#13;
&#13;
&#13;

11 个答案:

答案 0 :(得分:2)

方法1:bstrong标记换行电话号码。

&#13;
&#13;
<div id="contact_info">
  <h3><a id="contact">Contact</a></h3>
  <p>If you are interested in chatting or want more information on what I have been working on, I'd 
    love to hear from you!</p>
  <p>Phone: <strong>0064 1122334455</strong></p>
  <p>Email: tracyexcell@email.com</p>
</div>
&#13;
&#13;
&#13;

方法2:包装内联元素(如span),在font-weight: bold属性的css中应用类和样式。

&#13;
&#13;
.tel {
  font-weight: bold;
}
&#13;
<div id="contact_info">
  <h3><a id="contact">Contact</a></h3>
  <p>If you are interested in chatting or want more information on what I have been working on, I'd 
    love to hear from you!</p>
  <p>Phone: <span class="tel">0064 1122334455</span></p>
  <p>Email: tracyexcell@email.com</p>
</div>
&#13;
&#13;
&#13;

答案 1 :(得分:1)

您可以使用下面的<b><strong>标记;

 <div id="contact_info">
                        <h3><a id="contact">Contact</a></h3>
                        <p>If you are interested in chatting or want more information on what I have been working on, I'd 
                            love to hear from you!</p>
                            <p>Phone: <b>0064 1122334455</b></p>

OR

 <div id="contact_info">
                            <h3><a id="contact">Contact</a></h3>
                            <p>If you are interested in chatting or want more information on what I have been working on, I'd 
                                love to hear from you!</p>
                                <p>Phone: <strong>0064 1122334455</strong></p>
                                <p>Email: tracyexcell@email.com</p>

答案 2 :(得分:1)

为此,您必须使用 CSS font-weight属性。

<html>
<head>
<style>
p.normal {
    font-weight: normal;
}

p.light {
    font-weight: lighter;
}

p.thick {
    font-weight: bold;
}

p.thicker {
    font-weight: 900;
}
</style>
</head>
<body>

<p class="normal">Hello</p>
<p class="light">Hello</p>
<p class="thick">Hello</p>
<p class="thicker">Hello</p>

</body>
</html>

希望它会有所帮助。

答案 3 :(得分:1)

您可以使用b标记将文字设为粗体。 或者使用css为此元素设置样式。

&#13;
&#13;
    <div id="contact_info">
        <h3><a id="contact">Contact</a></h3>
        <p>If you are interested in chatting or want more information on what I
        have been working on, I'd love to hear from you!</p>
        <p>Phone: <b>0064 1122334455</b></p>
        <p>Email: tracyexcell@email.com</p>
    </div>
&#13;
&#13;
&#13;

答案 4 :(得分:1)

您可以使用以下代码

  <p><strong>Phone: 0064 1122334455</strong></p>

答案 5 :(得分:1)

只需使用粗体标记,例如<link rel="stylesheet" type="text/css" href="css/jquery.datepick.css"/> <script type="text/javascript" src="js/jquery.plugin.js"></script> <script type="text/javascript" src="js/jquery.datepick.js"></script> <script type="text/javascript" src="js/jquery.jquery.datepick-id.js"></script> <script> $(function(){$('#entry_2').datepick({dateFormat:'dd/mm/yyyy'})}); </script>

答案 6 :(得分:1)

尝试使用<b>0064 1122334455</b>

&#13;
&#13;
<strong>
&#13;
&#13;
&#13;

答案 7 :(得分:1)

使用粗体标记

 {{ '%d %b %y'.format(invc.invoice_date) }} 

答案 8 :(得分:1)

使用CSS中的font-weight字段:

.bold{
    font-weight:bold;
}

并在电话号码周围添加范围标记:

<div id="contact_info">
    <h3><a id="contact">Contact</a></h3>
    <p>If you are interested in chatting or want more information on what I have been working on, I'd 
    love to hear from you!</p>
    <p>Phone: <span class='bold'>0064 1122334455</span></p>
    <p>Email: tracyexcell@email.com</p>

答案 9 :(得分:1)

您可以使用以下内容:<p><b> Phone: 0064 1122334455 </b> </p>

答案 10 :(得分:0)

jsfiddle.net/75nwgqop/

#phoneNumber {
    font-weight : bold;
}

为段落标记提供id'phoneNumber'。然后在css文件中添加font-weight属性到id'phoneNumber'。