如何在特定列的底部创建仅带边框的表格?

时间:2015-11-05 23:13:06

标签: html css

我有一个html页面,我需要创建包含以下内容的部分:

enter image description here

我有以下css:

#tblComments > tbody >first-of-type > tr > td:first-child 
{
  border-bottom:1px solid black;         
}

以及以下html:

<div id="comments">
    <table id="tblComments">
        <tr>
            <td>ISSUER COMMENTS (IF APPROPRIATE)</td>
            <td></td>
        </tr>
        <tr>
            <td></td>
        </tr>
        <tr>
            <td></td>
        </tr>
    </table>

我该如何创建呢?

2 个答案:

答案 0 :(得分:0)

给你想要这个类的底部边框的列

<div class="border"></div>

然后在css中执行此操作

.border {
    border-bottom: 1px solid black;
}

答案 1 :(得分:0)

您可以选择使用类选择器

的边框
// The file first needs to be uploaded to Parse before it can be saved to the object in the database
 ParseFile _playerFile;

 public void CreatePlayer()
 {
     StartCoroutine (UploadPlayerFile ((response) => {
         if(response == 1)
             StartCoroutine(CreateProjectAsync());                        
         else
             Debug.LogError("The file could not be uploaded");
     }));
 }        

 IEnumerator UploadPlayerFile(Action <int> callback)
 {
     var fileBytes = System.IO.File.ReadAllBytes (@"C:\myfile.jpg");
     _playerFile = new ParseFile ("file.jpg",  fileBytes, "image/jpeg");

     var saveTask = _playerFile.SaveAsync ();

     while (!saveTask.IsCompleted)
         yield return null;        

     if (saveTask.IsFaulted) {
         Debug.LogError ("An error occurred while uploading the player file : " + saveTask.Exception.Message);
         callback (-1);
     } else {            
         callback (1);
     }    
 }

 IEnumerator CreateProjectAsync()
 {        
     ParseObject player = new ParseObject ("Player");
     player ["Number"] = 111;
     player ["Files"] = _playerFile;

     var saveTask = player.SaveAsync ();

     while (!saveTask.IsCompleted)
         yield return null;        

     if (saveTask.IsFaulted) {
         Debug.LogError ("An error occurred while creating the player object : " + saveTask.Exception.Message);

     } else {    
         Debug.Log ("Player created successfully");
     }    
 }